Textbox not initializing in userform

tismemb

New Member
Joined
Mar 14, 2014
Messages
2
Hi all,
I'm trying to make an excel sheet that will fill in labels to a 96 well plate in order to sort and calculate the data.
The problem is when i set up the textbox in the user form i want it to pull data on the plate format from cells that have already been filled in using another userform i have created for the standard curve.
My userform has 96 text boxes (one for each well in the plate). They have been named A1 through H12 corresponding to the wells. What I have written is:

Private Sub PlateFormat_Intialize()
A1.Value = Range("Q2").Value
End Sub

with Q2 being the cell in the workbook that it should pull the text from

The userform always loads with the textbox blank.
What am i doing wrong? I tried activating the correct sheet in the workbook first that doesn't help. I included a command button where i put the same value code in and then it will update. I don't want to have to update the form however. I want it to load with the cells filled in.

Thanks!
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
Be more specific about the sheet you are picking from

e.g
Code:
Worksheets("Sheet1").Range("Q2").value
rather than just Range("Q2").Value
 
Upvote 0
It should be Userform_Initialize no formname_Initialize.
 
Upvote 0
Awesome that took care of it. I've never run into that issue before with needing it to say Userform_Initialize()
 
Upvote 0

Forum statistics

Threads
1,213,485
Messages
6,113,931
Members
448,533
Latest member
thietbibeboiwasaco

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