Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 258
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,073
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,073
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 258
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 258
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,073
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
R/T 424 - Object required Help Jim May Excel Discussion (Misc queries) 2 April 10th 08 03:01 PM
Object Required Chuck Neal Excel Programming 1 March 27th 06 04:03 AM
Object Required teresa Excel Programming 9 May 31st 05 06:21 PM
Object required? Vasant Nanavati Excel Programming 0 May 14th 05 09:38 PM


All times are GMT +1. The time now is 10:56 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"