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 error

With my UserForm still open I want to run the code below. My problem is that
when the Called procedure is run it stops on the first line "TextBox88.Text
= Worksheets("Income").Range("J3").Text" and I get an Object Required error.
I know I could include this with the UserForm code, but this is just one
small snippet. I would need to replicate it about 60 times.

Private Sub TextBox80_Exit(ByVal Cancel As MSForms.ReturnBoolean)

If TextBox80.Value "" Then
Worksheets("Income").Range("B3").Formula = "=" & TextBox80.Value
Else
Worksheets("Income").Range("B3").Formula = TextBox80.Value
End If
TextBox80.Text = Worksheets("Income").Range("B3").Text
Call Initialization.UserForm_Update

End Sub


Sub UserForm_Update()

'This macro intializes the Data Input UserForm

'Populates January

TextBox88.Text = Worksheets("Income").Range("J3").Text
TextBox90.Text = Worksheets("Income").Range("L3").Text

End Sub


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 104
Default Object Required error

Try
UserForm1.TextBox88.text = Worksheets("Income").Range("J3").Text
Make sure to reference the userform.

Rick

"Patrick Simonds" wrote in message
...
With my UserForm still open I want to run the code below. My problem is
that when the Called procedure is run it stops on the first line
"TextBox88.Text = Worksheets("Income").Range("J3").Text" and I get an
Object Required error. I know I could include this with the UserForm code,
but this is just one small snippet. I would need to replicate it about 60
times.

Private Sub TextBox8
_Exit(ByVal Cancel As MSForms.ReturnBoolean)

If TextBox80.Value "" Then
Worksheets("Income").Range("B3").Formula = "=" & TextBox80.Value
Else
Worksheets("Income").Range("B3").Formula = TextBox80.Value
End If
TextBox80.Text = Worksheets("Income").Range("B3").Text
Call Initialization.UserForm_Update

End Sub


Sub UserForm_Update()

'This macro intializes the Data Input UserForm

'Populates January

TextBox88.Text = Worksheets("Income").Range("J3").Text
TextBox90.Text = Worksheets("Income").Range("L3").Text

End Sub




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 40
Default Object Required error


It will probably work if you change .Text into .Value



"Patrick Simonds" schreef in bericht
...
With my UserForm still open I want to run the code below. My problem is
that when the Called procedure is run it stops on the first line
"TextBox88.Text = Worksheets("Income").Range("J3").Text" and I get an
Object Required error. I know I could include this with the UserForm code,
but this is just one small snippet. I would need to replicate it about 60
times.

Private Sub TextBox80_Exit(ByVal Cancel As MSForms.ReturnBoolean)

If TextBox80.Value "" Then
Worksheets("Income").Range("B3").Formula = "=" & TextBox80.Value
Else
Worksheets("Income").Range("B3").Formula = TextBox80.Value
End If
TextBox80.Text = Worksheets("Income").Range("B3").Text
Call Initialization.UserForm_Update

End Sub


Sub UserForm_Update()

'This macro intializes the Data Input UserForm

'Populates January

TextBox88.Text = Worksheets("Income").Range("J3").Text
TextBox90.Text = Worksheets("Income").Range("L3").Text

End Sub




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Object Required error

Assume the Userform is Userform1

Sub UserForm_Update()

'This macro intializes the Data Input UserForm

'Populates January

Userform1.TextBox88.Text = Worksheets("Income").Range("J3").Text
Userform1.TextBox90.Text = Worksheets("Income").Range("L3").Text

End Sub

--
Regards,
Tom Ogilvy


"Patrick Simonds" wrote in message
...
With my UserForm still open I want to run the code below. My problem is
that when the Called procedure is run it stops on the first line
"TextBox88.Text = Worksheets("Income").Range("J3").Text" and I get an
Object Required error. I know I could include this with the UserForm code,
but this is just one small snippet. I would need to replicate it about 60
times.

Private Sub TextBox80_Exit(ByVal Cancel As MSForms.ReturnBoolean)

If TextBox80.Value "" Then
Worksheets("Income").Range("B3").Formula = "=" & TextBox80.Value
Else
Worksheets("Income").Range("B3").Formula = TextBox80.Value
End If
TextBox80.Text = Worksheets("Income").Range("B3").Text
Call Initialization.UserForm_Update

End Sub


Sub UserForm_Update()

'This macro intializes the Data Input UserForm

'Populates January

TextBox88.Text = Worksheets("Income").Range("J3").Text
TextBox90.Text = Worksheets("Income").Range("L3").Text

End Sub




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
Error: Object required Stuart[_21_] Excel Programming 2 September 29th 05 09:07 AM
Object required error broogle Excel Programming 7 March 21st 05 09:01 AM
Error 424 - Object Required [email protected] Excel Programming 2 December 30th 04 03:38 PM
Object Required Error Steph[_3_] Excel Programming 3 August 13th 04 03:26 PM
Syntax Error Runtime Error '424' Object Required sjenks183 Excel Programming 1 January 23rd 04 09:25 AM


All times are GMT +1. The time now is 02:59 AM.

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

About Us

"It's about Microsoft Excel"