How to select the sheet name from ddm

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

rizvisa1 Posts 4478 Registration date Thursday 28 January 2010 Status Contributor Last seen 5 May 2022 766
13 Jul 2010 à 07:27
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