Add worksheets in combobox to enter and save record to selected sheetname automatically

nagavasarala

New Member
Joined
Jan 6, 2018
Messages
15
Hi,

I need to maintain my daily sales month wise so have created recommended user form but i have total 12 worksheets in one workbook

so i need to create a combobox in userform and need to Add worksheets in combobox to enter and save record to selected sheetname automatically.

can you help me to figure out the coding.


have given the below but the same is not working.

Private Sub UserForm_Initialize()
For Each sht In ActiveWorkbook.Sheets
Me.ComboBox1.AddItem sht.Name
Next sht


End Sub

please help me
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
What is not working?
Do you get any error messages?
 
Upvote 0
No error but the sheet is not selecting and if enter data it is going to save active sheet only but i want to save the same with selected sheet if i want to add data into (sheetname) Mar18
if i select sheet mar18 in combobox and enter the date it should save into Mar18 sheet

need your help on this
 
Upvote 0
The code you've posted is only populating the combobox, what code have you got for selecting the sheet & adding data?
 
Upvote 0
In your op you said
have given the below but the same is not working.
Is that correct? Does the combobox have your sheet names in?
 
Upvote 0
The code you posted only populates the combobox.
Do you have any other code?
 
Upvote 0
In post#3 you said
No error but the sheet is not selecting and if enter data it is going to save active sheet only
How is data from the userform being saved to the active sheet if you have no code?
 
Upvote 0

Forum statistics

Threads
1,224,827
Messages
6,181,194
Members
453,021
Latest member
pingpong7117

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top