Quick question

Rockhopper3

Board Regular
Joined
Apr 11, 2006
Messages
131
Just a quick question. I have a userform set up and I want the textbox2 to have text entered into it automattically when the user form opens. It needs to have the value of cell "I3" in it. Thanks.
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
Hi
Something like this in the form module
Code:
Private Sub UserForm_Initialize()
  Me.TestBox2.Text = Sheets("YourSheetNameHere").Range("i3").Value
End Sub
 
Upvote 0
The user form will be used on 13 different sheets. I need the value of "I3" of the active sheet to appear in the textbox.
 
Upvote 0
The user form will be used on 13 different sheets. I need the value of "I3" of the active sheet to appear in the textbox.

just change

Sheets("YourSheetNameHere") to

ActiveSheet
 
Upvote 0

Forum statistics

Threads
1,215,053
Messages
6,122,882
Members
449,097
Latest member
dbomb1414

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