Text Box Value From ActiveCell

G

goss

Hi all,

When my form loads I would like the text box to display the contents
of the activecell
I thought the code below would accomplish my goal
But the textbox is empt when the forrm is displayed
The name of the form is correct and the name of the text box is
correct
No errors are cast

Thanks!
goss

Code:
Private Sub frmRevenueIntegration_Initialize()
txtCurrentDate = ActiveCell.Value
End Sub
 
J

JLGWhiz

Adding to Mike's input, the initialize event can only be executed in the
form's code module. Therefor, the predefined macro name of
UserForm_Initialize must be used to perform the actions under the initialize
event. This applies to all of the predefined event codes listed under the
declarations of the user form. You can add a name in the properties window,
then click the declarations drop down and click on any event and it
automatically inserts Private Sub UserForm_<event> into the code window.
 
G

goss

Adding to Mike's input, the initialize event can only be executed in the
form's code module.  Therefor, the predefined macro name of
UserForm_Initialize must be used to perform the actions under the initialize
event.  This applies to all of the predefined event codes listed under the
declarations of the user form.  You can add a name in the properties window,
then click the declarations drop down and click on any event and it
automatically inserts Private Sub UserForm_<event> into the code window.






- Show quoted text -

Thanks guys!
It is returning the incorrect value
So instead of activecell I need to tell the userfrom to initialize
with textbox displaying the contents of

Sheet: Data
Cell (r,3)
Where r is first non-numeric value found in col 3

Can I pass these argument to the userform_intialize event?

Thanks!
goss
 
G

goss

Thanks guys!
It is returning the incorrect value
So instead of activecell I need to tell the userfrom to initialize
with textbox displaying the contents of

Sheet: Data
Cell (r,3)
Where r is first non-numeric value found in col 3

Can I pass these argument to the userform_intialize event?

Thanks!
goss- Hide quoted text -

- Show quoted text -

Bump.
Hi all.
Any idea how I can get the value of the cell I reference above to the
text box on the userform when it initializes?

Thanks!
goss
 
Top