How to select the sheet name from ddm

Solved/Closed
yogesh01
Posts
4
Registration date
Saturday July 3, 2010
Status
Member
Last seen
December 3, 2010
- Jul 10, 2010 at 10:41 PM
rizvisa1
Posts
4479
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
May 5, 2022
- Jul 13, 2010 at 07:27 AM
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

rizvisa1
Posts
4479
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
May 5, 2022
769
Jul 13, 2010 at 07:27 AM
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