Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Object Required
I get an Object Required error when I run the code below. I think I know why
but do not know how to fix it. The TextBoxes I am referencing are on UserForm DataInput so I assume the Object that is Required is DataInput but I do not know how to alter the code to include the Object. TextBox88.Text = Worksheets("Income").Range("J3").Text TextBox90.Text = Worksheets("Income").Range("L3").Text |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Object Required
Patrick Simonds wrote: I get an Object Required error when I run the code below. I think I know why but do not know how to fix it. The TextBoxes I am referencing are on UserForm DataInput so I assume the Object that is Required is DataInput but I do not know how to alter the code to include the Object. TextBox88.Text = Worksheets("Income").Range("J3").Text TextBox90.Text = Worksheets("Income").Range("L3").Text Hi Patrick, If the TextBoxes are on the activesheet, then try replacing TextBox88.Text with... ActiveSheet.Shapes("TextBox88").Text and similarly with the other TextBox. Ken Johnson |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Object Required
Hi Patrick,
When Excel names a Text Box it includes spaces so you might still have trouble if those spaces are not included. Also, on my machine the .Text doesn't work, I've had to use .TextFrame.Characters.Text, so maybe it should be.. ActiveSheet.Shapes("Text Box 88").TextFrame.Characters.Text = etc Ken Johnson |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Object Required
The TextBox is on a UserForm named Data_Input (which is open at the time the
code is run). Code below is intended to update the contents of the two TextBoxes (on the active UserForm) as data is added to the worksheet. TextBox88.Text = Worksheets("Income").Range("J3").Text TextBox90.Text = Worksheets("Income").Range("L3").Text "Ken Johnson" wrote in message ps.com... Patrick Simonds wrote: I get an Object Required error when I run the code below. I think I know why but do not know how to fix it. The TextBoxes I am referencing are on UserForm DataInput so I assume the Object that is Required is DataInput but I do not know how to alter the code to include the Object. TextBox88.Text = Worksheets("Income").Range("J3").Text TextBox90.Text = Worksheets("Income").Range("L3").Text Hi Patrick, If the TextBoxes are on the activesheet, then try replacing TextBox88.Text with... ActiveSheet.Shapes("TextBox88").Text and similarly with the other TextBox. Ken Johnson |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Object Required
Working with what you gave me I came up with a solution:
Data_Input("TextBox88").Text = Worksheets("Income").Range("J3").Text Data_Input("TextBox90").Text = Worksheets("Income").Range("L3").Text "Patrick Simonds" wrote in message ... The TextBox is on a UserForm named Data_Input (which is open at the time the code is run). Code below is intended to update the contents of the two TextBoxes (on the active UserForm) as data is added to the worksheet. TextBox88.Text = Worksheets("Income").Range("J3").Text TextBox90.Text = Worksheets("Income").Range("L3").Text "Ken Johnson" wrote in message ps.com... Patrick Simonds wrote: I get an Object Required error when I run the code below. I think I know why but do not know how to fix it. The TextBoxes I am referencing are on UserForm DataInput so I assume the Object that is Required is DataInput but I do not know how to alter the code to include the Object. TextBox88.Text = Worksheets("Income").Range("J3").Text TextBox90.Text = Worksheets("Income").Range("L3").Text Hi Patrick, If the TextBoxes are on the activesheet, then try replacing TextBox88.Text with... ActiveSheet.Shapes("TextBox88").Text and similarly with the other TextBox. Ken Johnson |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Object Required
Hi Patrick, It's nice to know my wrong answer wasn't a total loss:-) Ken Johnson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
R/T 424 - Object required Help | Excel Discussion (Misc queries) | |||
Object Required | Excel Programming | |||
Object Required | Excel Programming | |||
Object required? | Excel Programming |