Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Reference A Combobox On The First page.
I have a combobox ( named "ddCity" ) placed on the first page of a
worksheet. On the Activate event of ANY other worksheet, I want to display a polite message indicating they need to choose a city, first. How do I reference the combobox? Something like... If isnull(Worksheets("Main").ComboBox("ddCity").value ) = True Then MsgBox "Please Choose A City." Worksheets("Main").ComboBox("ddCity").Select Exit Sub End If |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Reference A Combobox On The First page.
Private Sub Worksheet_Activate()
If Worksheets("Main").ddCity.Value = "" Then MsgBox "Please Choose A City." Worksheets("Main").Select Worksheets("Main").ddCity.Activate Exit Sub End If End Sub This assumes ddcity is the name of an activeX combobox from the control toolbox toolbar and the name ddcity is set in the name property when you right click on it in design mode and select properties. Tested and worked for me. -- Regards, Tom Ogilvy "Sean" wrote in message ups.com... I have a combobox ( named "ddCity" ) placed on the first page of a worksheet. On the Activate event of ANY other worksheet, I want to display a polite message indicating they need to choose a city, first. How do I reference the combobox? Something like... If isnull(Worksheets("Main").ComboBox("ddCity").value ) = True Then MsgBox "Please Choose A City." Worksheets("Main").ComboBox("ddCity").Select Exit Sub End If |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Reference A Combobox On The First page.
Thank you very much! That works perfect!
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I turn off page reference in page break preview | Excel Discussion (Misc queries) | |||
How To Reference What Is In A ComboBox In A Cell Formulas??? | Excel Worksheet Functions | |||
How do I copy a combobox to many cells with relative reference? | Excel Discussion (Misc queries) | |||
Add a combobox to an Excel spreadsheet and reference value in VBA | Excel Programming | |||
how to put a reference from a page of a multipage form to another page | Excel Programming |