Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Reference combo box in after update sub.
I'm trying to call a function in the after update sub, and pass it the
name of the combobox, which has been updated. I'm just not sure how to access this. Can anyone help? Thanks |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Reference combo box in after update sub.
ActiveControl.Name??
Hth, Merjet |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Reference combo box in after update sub.
Each afterupdate event only refers to one combobox, so
Private Sub ComboBox1_AfterUpdate() MyMacro ComboBox1 End Sub Sub MyMacro(CBox As MSForms.ComboBox) MsgBox CBox.Name & " " & CBox.Value End Sub -- Regards, Tom Ogilvy " wrote: I'm trying to call a function in the after update sub, and pass it the name of the combobox, which has been updated. I'm just not sure how to access this. Can anyone help? Thanks |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Reference combo box in after update sub.
On 28 Feb, 15:45, "merjet" wrote:
ActiveControl.Name?? Hth, Merjet Hi Merjet, Thanks for the quick reply. I've just tried that, but the combo box is on a multipage form, so ActiveControl.Name just returns "multipage1". Is there a way round this? Laura |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Reference combo box in after update sub.
Ok, between the two replies, I now have what I need.
Many thanks! Laura |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Reference combo box in after update sub.
for the edification of anyone reading this thread with a similar problem, my
original answer provided a complete solution and works fine whether with a multipage or not and required no further modification. Each afterupdate event only refers to one combobox, so Private Sub ComboBox1_AfterUpdate() MyMacro ComboBox1 End Sub Sub MyMacro(CBox As MSForms.ComboBox) MsgBox CBox.Name & " " & CBox.Value End Sub This discounts any special needs the OP may have had that were not stated in the original question or follow on posts. -- Regards, Tom Ogilvy " wrote: Ok, between the two replies, I now have what I need. Many thanks! Laura |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Input box to update combo box | Excel Programming | |||
Combo box update to field | Excel Discussion (Misc queries) | |||
combo reference on another combo box for picking address etc. | Excel Worksheet Functions | |||
Combo update filtering | Excel Programming | |||
Combo Box Before Update | Excel Programming |