Hi
I try make UserForm and need help
1)
I have 2 combobox in form and 1command buton.
in combobox1 i put list of items in active sheet selected range.
But i need put list of worksheets in combobox2
i have 1 code but cant finish this
2)
then how i can put this 2 answer together in this code
I try make UserForm and need help
1)
I have 2 combobox in form and 1command buton.
in combobox1 i put list of items in active sheet selected range.
But i need put list of worksheets in combobox2
i have 1 code but cant finish this
Code:
For r = 1 To Worksheets.Count
'how i can put this answer directly in combo not in some sheet??
Worksheets("Sheet1").Cells(r, 1).Value = Worksheets(r).Name
Next
2)
then how i can put this 2 answer together in this code
Code:
Private Sub CommandButton1_Click()
With ActiveSheet.Range("A1:L500")'<----- in place of Activesheet need be value of combobox2( Sheet choice)
Set c = .Find(what:="here")'<------- in place "here" i need put value of combobox1( find same value and activate )
If Not c Is Nothing Then
c.Activate
Else
MsgBox "Not in this sheet"
End If
End With
End Sub