Question regarding Userform

sinned141

Board Regular
Joined
May 4, 2009
Messages
115
Hi All

I have a userform with several textboxes which fill on my worksheet when I press the fill button, however I was wandering if there is a way I can change this so that I can open the userform to edit the text rather than having to rewrite it all?

Code:
Private Sub CommandButton1_Click()
Sheets("Details").Range("B12") = TextBox1.Text
Sheets("Details").Range("B15") = Textbox2.Text
Sheets("Details").Range("B13") = TextBox3.Text
Sheets("Details").Range("B16") = TextBox4.Text
Sheets("Details").Range("B17") = TextBox5.Text
Sheets("Details").Range("B19") = TextBox6.Text
Sheets("Details").Range("B20") = TextBox7.Text
Sheets("Details").Range("B14") = TextBox8.Text
Sheets("Details").Range("B18") = TextBox9.Text
End Sub

Many Thanks in advance
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
Yes - basically reverse all that in the Initialize event of the userform
Code:
Private Sub Userform_Initialize()

TextBox1.Text = Sheets("Details").Range("B12")
' etc
End Sub
 
Upvote 0
Solution

Forum statistics

Threads
1,215,066
Messages
6,122,948
Members
449,095
Latest member
nmaske

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