Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am trying to find out how to automatically remove a combo box after it is
created. This process needs to be repeatable. i.e. use one combo box response to generate a new combo box, then remove the new combo box after the message box that pops up from the second box actions have been acknowledged. Then be able to repeate the process. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
An ActiveX combobox is both an OleObject and a Shape
Activesheet.OleObject("Combobox1").Delete Activesheet.Shapes("Combobox2").Delete A combobox from the forms toolbar is both a shape and an dropdown Activesheet.Shapes("Drop Down 1").Delete ActiveSheet.DropDowns("Drop Down 1").Delete A dropdown from data validation using the list option ActiveCell.Validation.Delete ActiveCell.offset(1,0).Select -- Regards, Tom Ogilvy "James" wrote in message ... I am trying to find out how to automatically remove a combo box after it is created. This process needs to be repeatable. i.e. use one combo box response to generate a new combo box, then remove the new combo box after the message box that pops up from the second box actions have been acknowledged. Then be able to repeate the process. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The Combo Box is from the forms Toolbar. Each time the first combo box
creates a new second Combo box, it is given an increasing number. So if I hardcode a number into the VBA code, it only works one time then the next time the second Combo box is created, it has a new number. James "Tom Ogilvy" wrote: An ActiveX combobox is both an OleObject and a Shape Activesheet.OleObject("Combobox1").Delete Activesheet.Shapes("Combobox2").Delete A combobox from the forms toolbar is both a shape and an dropdown Activesheet.Shapes("Drop Down 1").Delete ActiveSheet.DropDowns("Drop Down 1").Delete A dropdown from data validation using the list option ActiveCell.Validation.Delete ActiveCell.offset(1,0).Select -- Regards, Tom Ogilvy "James" wrote in message ... I am trying to find out how to automatically remove a combo box after it is created. This process needs to be repeatable. i.e. use one combo box response to generate a new combo box, then remove the new combo box after the message box that pops up from the second box actions have been acknowledged. Then be able to repeate the process. |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I figured out how to name the combo box when it was being created so I could
use the same referance to delete it. Thank you Tom for the code to delete DropDown . James "Tom Ogilvy" wrote: An ActiveX combobox is both an OleObject and a Shape Activesheet.OleObject("Combobox1").Delete Activesheet.Shapes("Combobox2").Delete A combobox from the forms toolbar is both a shape and an dropdown Activesheet.Shapes("Drop Down 1").Delete ActiveSheet.DropDowns("Drop Down 1").Delete A dropdown from data validation using the list option ActiveCell.Validation.Delete ActiveCell.offset(1,0).Select -- Regards, Tom Ogilvy "James" wrote in message ... I am trying to find out how to automatically remove a combo box after it is created. This process needs to be repeatable. i.e. use one combo box response to generate a new combo box, then remove the new combo box after the message box that pops up from the second box actions have been acknowledged. Then be able to repeate the process. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
remove text that pops up with combo box | Excel Worksheet Functions | |||
How can I automatically remove duplicate data within a column? | Excel Discussion (Misc queries) | |||
How do I automatically remove carriage returns in Excel? | Excel Discussion (Misc queries) | |||
Run a MACRO automatically by selecting value from combo box | Excel Programming | |||
Automatically remove &[Date] | Excel Programming |