Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I have a userform combobox that contains 9 listed items. When the user selects an item the linked cell is displayed in a text area below the combobox. The code is from a John Walkenbach book and works fine except when the user opens the userform and immediately selects the last option from the combobox. If they choose any other option all works fine. Please could someone advise how to stop the error occurring? - Private Sub UpdateForm() ComboBoxTopics.ListIndex = CurrentTopic - 1 Me.Caption = HelpFormCaption & _ " (" & CurrentTopic & " of " & TopicCount & ")" With LabelText .Caption = HelpSheet.Cells(CurrentTopic, 2) .AutoSize = False .Width = 212 .AutoSize = True End With With Frame1 .ScrollHeight = LabelText.Height + 5 .ScrollTop = 1 End With If CurrentTopic = 1 Then NextButton.SetFocus ElseIf CurrentTopic = TopicCount Then PreviousButton.SetFocus End If PreviousButton.Enabled = CurrentTopic < 1 NextButton.Enabled = CurrentTopic < TopicCount End Sub -------------------------------------- Thanks, Mickey |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
vlookup formula fails to return data search item is text | Excel Worksheet Functions | |||
Filter Copy/Paste Fails - Two Ranges Selected? | Excel Programming | |||
Combobox Add Item | Excel Programming | |||
Excel Fails when add-in is selected | Excel Worksheet Functions | |||
ComboBox and select item | Excel Programming |