dim o for each o in controls debug.print typename(o) next
µäÐ͵ĵ¹·ÖÌù£¡ 5Â¥Õý½â£¡ If TypeOf ¿ÉÒÔÅжϴ«Èë¹ý³ÌµÄ¿Ø¼þÊÇ·ñΪһÎı¾¿ò¡£
Sub ControlProcessor(MyControl As Control) If TypeOf MyControl Is CommandButton Then Debug.Print "You passed in a " & TypeName(MyControl) ElseIf TypeOf MyControl Is CheckBox Then Debug.Print "You passed in a " & TypeName(MyControl) ElseIf TypeOf MyControl Is TextBox Then Debug.Print "You passed in a " & TypeName(MyControl) End If End Sub
Çë½ÌһϣºÎÒÓÃvbдÁËÒ»¸öµ÷ÓÃIllustratorµÄ²âÊÔ³ÌÐò£¬´úÂëºÜ¼òµ¥£ºPrivate Sub Command1_Click() Dim app As New Illustrator.Application Dim doc As Illustrator.Document Dim thislayer As Illustrator.Layer ......