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

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK

jindon

MrExcel MVP
Joined
Aug 21, 2004
Messages
16,995
Hi
Something like this in the form module
Code:
Private Sub UserForm_Initialize()
  Me.TestBox2.Text = Sheets("YourSheetNameHere").Range("i3").Value
End Sub
 

Rockhopper3

Board Regular
Joined
Apr 11, 2006
Messages
131
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.
 

jindon

MrExcel MVP
Joined
Aug 21, 2004
Messages
16,995
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
 

Forum statistics

Threads
1,141,718
Messages
5,708,068
Members
421,543
Latest member
SGM

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
Top