K
K
The code below list all the sheets name of active workbook in drop
down list. Because of the code line ".CLEAR" I am not able to get
combobox value. I want that when I select sheet name in drop down
list that name should appear as combobox text or value. and also how
can i stop some one to write in combobox as i want if some one write
in combobox the msgbox should appear saying "Select from drop down
list". Please can any friend solve my these queries about combobox.
Thanks
Private Sub ComboBox1_DropButtonClick()
Dim Sh As Worksheet
With ComboBox1
.CLEAR
For Each Sh In ActiveWorkbook.Sheets
If Sh.Name <> "" Then
.AddItem Sh.Name
End If
Next
End With
End Sub
down list. Because of the code line ".CLEAR" I am not able to get
combobox value. I want that when I select sheet name in drop down
list that name should appear as combobox text or value. and also how
can i stop some one to write in combobox as i want if some one write
in combobox the msgbox should appear saying "Select from drop down
list". Please can any friend solve my these queries about combobox.
Thanks
Private Sub ComboBox1_DropButtonClick()
Dim Sh As Worksheet
With ComboBox1
.CLEAR
For Each Sh In ActiveWorkbook.Sheets
If Sh.Name <> "" Then
.AddItem Sh.Name
End If
Next
End With
End Sub