Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Problem with Combobox.Dropdown method
I have a form with 3 dropdown comboboxes named ComboBoxForms, ComboBoxGroups
and ComboBoxDevices. I want when ComboBoxGroups is changed for ComboBoxDevices to get the focus and dropdown so its list is visible. I have the code below to do this. The code seems to work, as the ComboBoxDevices gets the focus and drops down. However, after that, upon exit from the sub as far as I can tell, I get the error "Run-time error '-2147417848 (80010108)': Automation error The object invoked has disconnected from its clients." Help! I have no idea what this means or how to correct it! Private Sub ComboBoxGroups_Change() ' update the devices to match the group ComboBoxDevices.Clear If ComboBoxGroups.Value = "" Then Exit Sub groupstart = ThisWorkbook.Groups_Select(ComboBoxGroups.Value) countDevices = ThisWorkbook.Devices_ListGroup(groupstart, grouplist) If countDevices 0 Then ComboBoxDevices.Visible = True LabelDeviceLabel.Visible = True ComboBoxDevices.list() = grouplist ComboBoxDevices.SetFocus ComboBoxDevices.DropDown Else ComboBoxDevices.Visible = False LabelDeviceLabel.Visible = False End If End Sub |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Problem with Combobox.Dropdown method
http://support.microsoft.com/default...;en-us;Q319832
Regards, Alan "FClifton" wrote in message ... I have a form with 3 dropdown comboboxes named ComboBoxForms, ComboBoxGroups and ComboBoxDevices. I want when ComboBoxGroups is changed for ComboBoxDevices to get the focus and dropdown so its list is visible. I have the code below to do this. The code seems to work, as the ComboBoxDevices gets the focus and drops down. However, after that, upon exit from the sub as far as I can tell, I get the error "Run-time error '-2147417848 (80010108)': Automation error The object invoked has disconnected from its clients." Help! I have no idea what this means or how to correct it! Private Sub ComboBoxGroups_Change() ' update the devices to match the group ComboBoxDevices.Clear If ComboBoxGroups.Value = "" Then Exit Sub groupstart = ThisWorkbook.Groups_Select(ComboBoxGroups.Value) countDevices = ThisWorkbook.Devices_ListGroup(groupstart, grouplist) If countDevices 0 Then ComboBoxDevices.Visible = True LabelDeviceLabel.Visible = True ComboBoxDevices.list() = grouplist ComboBoxDevices.SetFocus ComboBoxDevices.DropDown Else ComboBoxDevices.Visible = False LabelDeviceLabel.Visible = False End If End Sub |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Problem with Combobox.Dropdown method
Hi Alan,
Thanks for the link. I read through it but I didn't understand it completely. It seems I have an unqualified reference, but I'm not sure where in my code it is or how to fix it. Sorry for being dense! Can you help me spot the problem? Thanks! "Alan" wrote: http://support.microsoft.com/default...;en-us;Q319832 Regards, Alan "FClifton" wrote in message ... I have a form with 3 dropdown comboboxes named ComboBoxForms, ComboBoxGroups and ComboBoxDevices. I want when ComboBoxGroups is changed for ComboBoxDevices to get the focus and dropdown so its list is visible. I have the code below to do this. The code seems to work, as the ComboBoxDevices gets the focus and drops down. However, after that, upon exit from the sub as far as I can tell, I get the error "Run-time error '-2147417848 (80010108)': Automation error The object invoked has disconnected from its clients." Help! I have no idea what this means or how to correct it! Private Sub ComboBoxGroups_Change() ' update the devices to match the group ComboBoxDevices.Clear If ComboBoxGroups.Value = "" Then Exit Sub groupstart = ThisWorkbook.Groups_Select(ComboBoxGroups.Value) countDevices = ThisWorkbook.Devices_ListGroup(groupstart, grouplist) If countDevices 0 Then ComboBoxDevices.Visible = True LabelDeviceLabel.Visible = True ComboBoxDevices.list() = grouplist ComboBoxDevices.SetFocus ComboBoxDevices.DropDown Else ComboBoxDevices.Visible = False LabelDeviceLabel.Visible = False End If End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Combobox dropdown list??????????? | Excel Discussion (Misc queries) | |||
Combobox Dropdown method | Excel Programming | |||
USE OF DROPDOWN in Combobox-a problem | Excel Programming | |||
combo box dropdown method | Excel Programming | |||
ComboBox DropDown when Key is pressed | Excel Programming |