Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Private Sub UserForm_Initialize() txtCurrentDate = ActiveCell.Value End Sub "goss" wrote: 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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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. "goss" wrote: 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 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Nov 10, 8:42*am, JLGWhiz wrote:
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. "goss" wrote: 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- Hide quoted text - - 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 |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Nov 11, 4:13*am, goss wrote:
On Nov 10, 8:42*am, JLGWhiz wrote: 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.. "goss" wrote: 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- Hide quoted text - - 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- 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Echo Contents of ActiveCell into a Text box. | Excel Discussion (Misc queries) | |||
Adding text to an Activecell | Excel Programming | |||
If activecell.column = variable then activecell,offset (0,1) | Excel Discussion (Misc queries) | |||
How do I insert Text Box in ActiveCell | Excel Programming | |||
If activecell is not text | Excel Programming |