Email:      Pass:    Pass?
Close Window   
Free Ebook
Get Your Free Excel
Our Top 15 Excel Tutorials
Instant Access!

Subscribe for Free Excel tips & more!

Free Excel Forum

Saving Data From User Form To Excel Worksheet

Forum Register
Search Excel Forum Posts, Tutorials, Macros, Tips, and More


I am new to this VBA business and I have created a user form using VBA in excel to capture data from users. Now i need to save the data from the text boxes and combo boxes I created to be stored in particular cells on particular worksheets. How can i do this?


View Answers     

Similar Excel Tutorials

Prevent a User from Changing Any Data in Excel
I'll show you how to lock a spreadsheet so that nothing can be changed in it. This is a great feature to use when ...
Hide or Unhide a Worksheet by Hand in Excel
I'll show you how to hide worksheets in Excel so that a user cannot see them but you can still access data on them ...
Limit the Total Amount a User Can Enter into a Range of Cells in Excel
How to limit the amount that a user can enter into a range of cells in Excel.  This works great for budgeting works ...
Make Users Enable Macros in Order to View a Workbook in Excel
Tutorial showing you how to make a user enable macros in a workbook in order to view the workbook. This is very im ...

Helpful Excel Macros

Print Selected Worksheets in Excel
- This free excel macro will print all selected worksheets in Excel. If there are no other worksheets selected the active
Disables the "Save As" Feature in Excel
- This macro will disable the Save As feature in excel. This means that a user will not be able to resave the workbook un
Excel Macro to Save a Specific Worksheet as a New File
- This Excel Macro allows you to save a specific worksheet within the Excel Workbook to its own new file. You will be a
Save the Current Worksheet as a New Excel Workbook File
- This Excel Macro will save the currently visible/active worksheet (the one that you see when you run the macro) to a
Print Preview Display for Specific Worksheets in Excel
- This free Excel macro allows you to display the print preview mode or window in Excel for a specified Excel worksheet.

Similar Topics

c, I have created a user form in Excel using visual basic. I have created a command button that clears the data on the user form. The command button clears the text boxes but not the combo boxes. In VB, the programme that I type in is as follows:

Call UserForm_Initialize
End Sub

How do I get it to clear our the data in the combo boxes?

I have created a user form using Excel and VBA where a user can press a submit button to add data to a spreadsheet from the form. I have figured out a way for the user, once the data has been added to the spreadsheet and the form has been cleared, to reload the data from the spreadsheet back to the form in the textboxes. However, I cannot get it to work with combo boxes. Is there a way that this can be done with combo boxes as well?

Hello All!

Heres the scoop.

I have generated a form to compile a text file from multipe text boxes and combo boxes, the data is stored into several different cells each time the user completes the form and hits the button.

As it stands the user enters the data into the fields of the form, the data is written to cells before exporting to a text file, but i need to make sure only ASCII characters are typed into selective text boxes and other selective text boxes will contain numbers only before the information is saved to the cells.

In addition i will need to add a feature to make sure that duplicate entrys are not saved based on a certain text box.


one of my text boxes is labeled ChannelBox; and i want to ensure that the users do not use the same channel number.
I am assuming that i will need to do a VLookup or something, but was hoping that there could be an easier way to store and validate if the channel number has been used previously.

Looking into the future, i will be looking to make a way to edit the stored data and validate that no duplicate entrys exsist.
Probably save this for another day and after i get the program up and running all the way.

I have attached the file for reference.

Is it possible to insert data into a user form from an Excel worksheet?

What I mean is that i have a user form with a number of text boxes. however, i want the data in these text boxes to come from within a specified cell in an excel worksheet rather than the user inputting the data in the text box. I know this is possible when having combo boxes or drop down boxes but id like to do it with a text box as well.

The reason im doing this is to generate a sort of report of the data in a worksheet. If there is any other way please let me know coz i am new to VBA


Dear Sir and all my friends,
I have a problem of transfering data from a user form to a predefined worksheet whrere the data should get stored serially as per the items selected from the combobox on the user form. I am very new to excel and do not know much about excel vb programming. I have 65 items listed in the combobox and it is the 1st control to be selected on the user form while feeding data. Secondly I need to start with the 4th row in the worksheet to store the data for 1st item in the combo list. It should be such that the 1st item data on the user form will get stored in 4th row, the 2nd item in the 5th row and so on till 65th item. And the rows should be fixed for these items. Means when I feed the data for 1st item it should go to 1st row only. If a sample example(showing four to five data input text boxes with combo box list of 65 items (items like AS001,AS002 AB210....not fixed serially but limited to 65 items) data input with code can be replied, It will be of immense help to me.

Secondly, I want to have a time data to be displayed back on the user form in the same format as displayed in the worksheet. I have three text boxes on the user form that give the input to the predefined worksheet the time value. These are calculated in the sheet and stored in a cell that displays the required time data. That data I want to display back while saving the userform input to the worksheet. Example : On the User form X, Text Box 1, 2, and 3 are fed with time (as text) like 456:25, 25:00, 564:33 etc respectively and even sometimes 00:00. When transfered to worksheet Y, they are conditionally calculated and the result is stored in Cell say F2 for first row data. I have a text box on the user form to display thedata stored in F2 in the same format. The time format of the cell F2 is (37:30:55 pattern) I have tried and the data is getting displayed but in a format like 23.4444444 or when I change the value showing 15.33333333444 etc. So how can it be displayed in the same format as in the F2 cell. Note that Full F2 column will be holding the result when I feed the other rows.

Thanking you



Hi Guys,

I am very new to this forum - and really need some help.

I have created a form in vb in excel. Basically, we wanted to send the form to our services aro9und the country and ask them to enter their details - i.e. name address, service information (I created the form with combo boxes, tick boxes as well as text boxes in order for ppl to fill it in). The idea was supposed to be that once the data was entered the service could email this back to us.

I have managed to create the form and then also have found the code for the service to click submit and email the form back...

PROBLEM = the data doesn't save in the form when it is entered. I think, after doing some research that I haven't told this data to go to the excel spreadsheet behind it. NO ONE seems to be able to help me...

Can someone help? Tell me what I need to do...???? Please I will be so grateful. Please, please please?

Thank you guys in advance for taking the time to read this...


If someone could help me with UserForms I would be greatly appreciative. In my workbook (which will be shared by multiple users) I have a few sheets for each individual user. I have created a user form to allow them to enter in the data more easily, but I am not sure how to copy the data from the form to the sheet. I want the user to have the option of either typing the data into the cells or using the form by clicking on a command button (which is already set up). The form which I created also has some combo boxes because I need the users to select only certain data (from named ranges which are already in the workbook).

Additionally, would I have to create a user form for each user (each sheet)...Ideally, it would be awesome if I could just create one user form and put a link on my "Control Panel" page....then have the userform copy the data based into the appropriate sheet based on username. Therefore, the form would know which sheet to paste the data into...not even sure if this is possible.

If anyone could help me to get this working I would very much appreciate your time.


I have an employee that wants to capture data and keep it in a standard format. So I figured I would create a form in access and let him enter the data that way. He then could run reports and queries on the data.

Here is my current situation. I've built the form and have combo boxes, text boxes and a date selection field. I created a table in which to store all of this data. Can I now tell each combo box, text field which table column to store the data in?? Or did I do this backwards and needed to created the table first and then the form?

Apologies is this is an obvious question with a trivial answer.

Background. I'm putting together a spreadsheet that will be connected to word (via Mail Merge (?) - haven't got that far as yet). The users want the data input to be idiot-proof (yeah, I know). Here's how I'm thinking. Sheet 2 contains columns where each column contains the valid values for each combo box on the user form I'll create. On sheet 1 are the various rows of data that have been created by the user selecting items from the combo boxes in the user form and selecting add (push button).

My thought was to "expect" them to mark a row on sheet 1, run the user form which will automatically populate the combo boxes with the values from the selected row, after which they can select other values instead and change the selected row. All well and good (?).

My problem seems to be that if I have the user form running, I can't select a different row from sheet1 and get its values into the user form. Is this dependent on something like the user form being modal or .... or is this NOT a good design to start with ?

Dear Friends,
First of all thanks for all your cooperation you have extended to me so far. I need a help in editing the input data from a user form through another user form. For example When I feed data through a user form , it get stored in a predefined work sheet in predefined rows. Now I need to edit the Data That I have fed in another user form(say the Editing Form). In the editing form, I want to recall the data by selecting the heads from the combolist on the form so that, as per the combobox selection the respective data row(Cell values) are shown on the form in different text boxes. Now after displaying the data from the work sheet on the user form(Editing Form), I want to replace/correct some or the other value and save it so that it goes and get saved on the work sheet back.
(1) On the form I should have a SELECT Button to select the data as per the combobox selection to get the respective data displayed on the specified text boxes.
(2) After the data is displayed, I should be able to edit the data displayed in the text boxes and When I click another button named SAVE, the data replaces the values in the cells of the worksheet with the new edited values. It should be noted that un-edited values should remain as they were. Only changed cell values should be replaced (Over written)with new values.
(3) I am Attaching a sample copy of the workbook (nm766_WorkBook_2) . Request please workout the code by which I can be able to edit the stored data.

Thanking you .

With regards

I set up a pile of Combo Boxes to populate text data in cells using the OFFSET command.

The cells I copy data into can then be changed to suit the users needs ( For example the Combo box sets a cell to say "RAL", which the user changes manually to "EACH" as needed.

Everything is good UNTIL we use the SAVE AS command and change the Name of the spreadsheet.

Once the Nmae of the sheet changes, Excel recalculates all these combo boxes and overwrites the values the user changed. This is not good ..

I treid turning calcualtions to MANUAL this did not help as there are other things we do want to manaully calculate.

Is there any way to stop Excel from not refreshing the combo boxes upon saving? It is quite strange ....

Hi All,

I have two user forms in my excel sheet. In one form user needs to select ID from combo box and name of user auto populates in text box. When users press OK button in this form, it opens another form which has check boxes. I want auto ticked check boxes based on selection of ID in previous form. Based on selcetion of check boxes in this form, respective sheet would be activated.

If user has selected ID "001" from one form and in the second form ,"001" should be ticked automatically and other check boxes should be deactivated as well.

I have completed the coding of First form but I am not able to get any solution for auto ticking of check boxes.

Please help.

Many thanks.

Hi all

I have created a user form to create, save, edit and delete records to/from an Excel database. It has 2 combo boxes (combo 1 and combo 2). Combo 2 drop down list is dependent on the selection in combo 1. They both use dynamic named ranges for their lists and allow manual user input as well as selection from the drop down list.

When the form is used to read a record from the database, the 2 combo boxes are populated with the data in the record. I need to set the drop down list in combo 2 based on the value in combo 1 ie - I need to determine if combo 1 value was selected from the drop down list or manual user input. I can't use the index value when the record is first populated, as it it <-1 even if the value was originally selected from the list.

What is the best way to determine if combo 1 value is from the combo list or not?

As I am relatively new to coding, I am hoping for a simple answer



I have created a user form, with text boxes to capture certain information. This data then needs copying & pasting to another sheet with headers that match the captured data. The user form will be used daily so will always need to paste to the next empty row on sheet 1. I would only want data to submit when i hit the control button I have created in bottom right corner of the form.

I have read that you can reference in the properties of the text box to a linked cell but I cannot seem to find this anywhere. Is there another way of doing this using code?

There are also 4 tick boxes to get a yes/no answer. How do i get the relevant tick box to put a yes/no answer in the correct column on sheet 1? ( Columns H & I for reference)

I have attached the sheet for reference.



I have a user form with a few text boxes.

Can someone please give an example of what's the best way for the user forms text boxes hold user inputted values in them and for those values to be referenced by other macros.

I know that once a user form is unloaded, all of the data in it goes away. So I would need a command button in it to simply hide the user form.
Is there a way to prevent a user form from being closed by pressing the x at the top right?

I have many rows for which I intend to create such a user form. And the values from the text boxes will be used as values in other code.

Does anyone know of ways to go about this?

Than you

I am new to UserForms and I am trying to create a user form for data entry. I have created my form with 9 text boxes to enter into. Can you format these text boxes so when data is entered into them it is formatted as accounting? Also how can I get the data from the form to my spreadsheet into the next blank row?


i have a form that i have created which has a number of Text boxes and combo boxes.

a user will fill in the boxes and then manually transfer the information

i need a code or macro that i can assign to a button or cell that will clear / reset these boxes when it is clicked,

any ideas would be great


Before i start and to save you time looking at my profile, i am using excel 2010. So i have one worksheet with loads and loads of Combo boxes (form control) that are linked to a cell on another sheet and that sheet uses the linked cell along with a index and match formula in one to fetch data from a range for my chart. So based on the selection of the combo box option the chart changes.

My question is how do i change the size of the text in the Combo boxes (form control)? Is there any VBA to do this? .Font.Size?

If not i don't mind changing all my boxes to Combo boxes (activeX control), but i do have over 100 so what would be the best and fastest way to change all my current Combo boxes (form control) to Combo boxes (activeX control) whilst keeping everything the same so it all still functions. Maybe some more VBA? Plus i also need to be able to change the size in the new Combo boxes (activeX control) as well so telling me how would be splendid.


I have a form "Calculate Product Costs" that has several combo boxes on it. These combo boxes are populated by grabbing data off a work sheet when the form initializes, which works just fine.

Sometimes the user might not see an option he wants in one of these combo boxes and would want to open another form that will allow him to add the desired item to the list. I added buttons on the "calculate product costs" from that will open these other forms so he can do just that.

The problem is, once this second form closes and the "calculate product costs" from once again becomes active, the combo boxes don't refresh. I have to close the form and reopen it to make that happen.

I've put the code to populate the combo boxes in the form.activate and form.initialize procedures, but neither seem make things work, and I really don't see any other possible options that would do the job either.

There's got to be a way of accomplishing this (rather than adding a "refresh combo boxes" button on the form or something equally cumbersome), but I'm just not seeing it.


HI: I'm a new member to the forum: I am not a programmer and although I can do simple vba programming, I am definitely an amateur.
Here's my problem:
I created an Excel form that contains several combo boxes from the Control Toolbox that display the contents of referenced cells in another sheet of the same workbook that is locked and password protected. The combo boxes are linked to the cells that they cover on the form. Everything was working as expected until our office network changed to Windows XP and changed to Excel 2002. Now, every time I print the form, the combo boxes loose their placement on the form and align on the left side of the form.
The editing function on the combo boxes then ceases to function on the combo boxes that moved.
The printed version is printed correctly on the first time, but repeat prints put the combo boxes in their new postions.

Any suggestions on how to keep the combo boxes in their intended position on the form would be greatly appreciated.

Finally, the former company I worked for liked this form so much that the pop up identifier that I had placed on the form which was password protected was unlocked and my name removed and replaced by the company.) Is there a way to prevent similar event from happening to my work.

Say I have a number of Models, (say 2) and each of the model has three different characteristics. ie, Model 1 has char. 1,2 and 3, while Model 2 has char. 4,5 and 6.

In a user form, with a number of textboxes and combo boxes, I can choose one of the models in the first combo box, and with "Private Sub combobox1_change()" procedure, I can fill in automatically on the user form all the other boxes with data of the choosen Model.

My question is, when I select a model from the first combo box, I would like the second combo box to show the LIST of char. of the model selected in the first combo box, and only after both combo boxes have been selected, (say Model 2 with char. 5) will the other boxes in the user form be filled by some procedure I suppose is similar to the "Sub combobox_change()"?

How do I do that?


I have a user form which consists of a drop box and 3 text boxes.

As a sort of data validation when clicking the OK button on the user form I need the following:

If the user selects an item from the drop box then each of the text boxes must be filled with a value, otherwise a message is prompted when pressing OK and doesnt allow the user to continue.

(The drop boxes and text boxes are within a frame - dont know if that makes a difference)

How can i code this as I'm new to VBA and having trouble doing this?

I did read upon few solutions in this forum but I did not find what I was quite looking for. I have few text boxes and few combo boxes in one of my user forms. I have few text boxes and few combo boxes are set to be Required fields that means a user must enter a value in those fields. Please keep into considerations that a user can click on each fields or simply 'tab; thru them. If a user try to skip to next field then I want excel to show a warning message box prompting user to enter a data since this is a required field. Thank you for looking into it.

I have created an Excel userform with a couple of text boxes. How can I dismiss the user form automatically, say after 15 seconds, after the user inputs the data or after 15 seconds whether or not the user has changed the text boxes.

Is it possible to do this? I have been trying to use Application.OnTime but I can't see how to close the userform after the 15 seconds.

I need the following helps in preparing a user form controlled work book with multiple variables.

(a) I have created a user form with combo boxes and text boxes as inputs written to a defined worksheet in the work book. This is covering aound 25 columns when the data entered to the user form once and covering the defined row as it supposed to be. How the data could be written to another work sheet simultaneously in the same pattern?

(b) Secondly, how a simultaneous calculation (Sum function) can be done on the work sheet for each time data entered (need to add values of five inputs fed from the user form) and written to next coloumn as specified. For example If my data input is 05 different time durations entered as in put from the User form and are written to the specified worksheet in Cells D3 to H3. Now as soon as the data written on the columns, I need to fill the Cell I3 or any other selected cell in the same row automatically with the total sum of the cell values of D3 to H3. Can it be done with the VBA codes?