creating a simple userform

CameronGates

New Member
Joined
Mar 7, 2019
Messages
18
Remember I'm a newb so if I sound ignorant it's because I am, lol. Ok so I'm creating a simple user form that will be using a bunch of text boxes to input data into specified cells. So the code for each one of the text boxes look like this:

Private Sub TextBox1_Change()
Sheet3.Range("b1") = TextBox1.Value
End Sub

There are something like 60 text boxes all with the same code but specifying different cells and text boxes. here is the stupid question, how do I create the command click ok button to actually make it happen. Lol, sorry guys, i'm really new at this. Thanks for any help you guys can give.
 
Lol, yeah there isn't anything real logical because I realized what I did wrong late in the game as far as creating the text boxes so I'm just going to have to make due with it. Thanks guys for your help! so far everything is working except when I click the ok button the user form does not close so what would I need to do to make it close? I'm guessing I can just use the unload me code because instead of the sheet waiting to be entered until I click ok, It's filling it out in real time. Also What do I need to do to have the already filled out information show up in the userform? Reason being, if I enter the data and then close the form, once I open it back up, the form is empty and if I close out with a blank form it clears all the cells.
 
Last edited:
Upvote 0

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
If you want to close the Userform but retain the values in the Textboxes.
Put this script in a Button.

Me.Hide

Now if you close the Workbook all the values in the Textboxes will be lost
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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