Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hello? I have a problem with deleting ActiveX CommandButton control. Actualy I don't want to delete them. Here is an example: 1) First I draw CommandButton control from Control Toolbox and then assign him a macro... 2) Then I draw a few drawing objects (Line, Rectangle)... 3) Then I write a procedure where I want to delete this drawing objects (Line, Rectangle) with ... Worksheets(1).Shapes.SelectAll Selection.Delete ... 4) Now I run this procedure which delete all drawing objects (Line, Rectangle) and also CommandButton control. Can I lock or do something else to prevent deleting CommandButton. Thank you -- Dr.Ile ------------------------------------------------------------------------ Dr.Ile's Profile: http://www.excelforum.com/member.php...o&userid=15975 View this thread: http://www.excelforum.com/showthread...hreadid=516122 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Dr. Ile,
Try: '============= Public Sub Tester002() Dim SHP As Shape For Each SHP In ActiveSheet.Shapes If Not SHP.Type = 12 Then SHP.Delete End If Next SHP End Sub '<<============= --- Regards, Norman "Dr.Ile" wrote in message ... Hello? I have a problem with deleting ActiveX CommandButton control. Actualy I don't want to delete them. Here is an example: 1) First I draw CommandButton control from Control Toolbox and then assign him a macro... 2) Then I draw a few drawing objects (Line, Rectangle)... 3) Then I write a procedure where I want to delete this drawing objects (Line, Rectangle) with .. Worksheets(1).Shapes.SelectAll Selection.Delete .. 4) Now I run this procedure which delete all drawing objects (Line, Rectangle) and also CommandButton control. Can I lock or do something else to prevent deleting CommandButton. Thank you -- Dr.Ile ------------------------------------------------------------------------ Dr.Ile's Profile: http://www.excelforum.com/member.php...o&userid=15975 View this thread: http://www.excelforum.com/showthread...hreadid=516122 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() It's working! Thank you Norman Regards -- Dr.Ile ------------------------------------------------------------------------ Dr.Ile's Profile: http://www.excelforum.com/member.php...o&userid=15975 View this thread: http://www.excelforum.com/showthread...hreadid=516122 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
2007 Form Control/ActiveX Control font difference | Excel Discussion (Misc queries) | |||
How to control "Date Time Picker ActiveX Control" | Excel Programming | |||
Tab to an ActiveX control? | Excel Discussion (Misc queries) | |||
ActiveX Control | Excel Programming | |||
ActiveX control | Excel Programming |