How to select the sheet name from ddm

[Solved/Closed]
Report
Posts
4
Registration date
Saturday July 3, 2010
Status
Member
Last seen
December 3, 2010
-
Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
-
Hello,
I want to select which sheet to store data from the drop down menu.
thank you .


Private Sub UserForm_Initialize()
Dim i As Integer
For i = 1 To Worksheets.Count
Me.ComboBox1.AddItem Worksheets(i).Name
Next i
End Sub


1 reply

Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
768
you get the value from the combobox. This gives you the sheet name. Once you have the sheet name, you can use

Sheet(comboValue).select

...

See this
https://ccm.net/forum/affich-415639-remove-records-once-they-are-transfered#p420034

You need to look at the Private Sub CommandButton1_Click() routine
1
Thank you

A few words of thanks would be greatly appreciated. Add comment

CCM 2821 users have said thank you to us this month