Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
y y is offline
external usenet poster
 
Posts: 60
Default Object required.

Set rArea = Application.InputBox(prompt:="Select range:", Type:=8)
Set rXValues = Application.InputBox(prompt:="Select XValues:", Type:=8)
Set rYValues = Application.InputBox(prompt:="Select YValues:", Type:=8)


It worked fine.
Now it reports the error in subject to me.
Sometime VBA crashes on the 1st instruction, sometime on the 2nd.

I hope to translate correct the error message because I'm using the italian version of VBA.

Thanks, Alex.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,327
Default Object required.

Hi Alex

Did you declare the variables ? Did you account for invalid entries and
Cancel ?

This should take care of both:

Sub Test()
Dim rArea As Range
Dim rXValues As Range
Dim rYValues As Range
On Error Resume Next
Set rArea = Application.InputBox(prompt:="Select range:", Type:=8)
If rArea Is Nothing Then Exit Sub
Set rXValues = Application.InputBox(prompt:="Select XValues:", Type:=8)
If rXValues Is Nothing Then Exit Sub
Set rYValues = Application.InputBox(prompt:="Select YValues:", Type:=8)
If rYValues Is Nothing Then Exit Sub
End Sub

HTH. Best wishes Harald

"y" skrev i melding ...
Set rArea = Application.InputBox(prompt:="Select range:", Type:=8)
Set rXValues = Application.InputBox(prompt:="Select XValues:",

Type:=8)
Set rYValues = Application.InputBox(prompt:="Select YValues:",

Type:=8)


It worked fine.
Now it reports the error in subject to me.
Sometime VBA crashes on the 1st instruction, sometime on the 2nd.

I hope to translate correct the error message because I'm using the

italian version of VBA.

Thanks, Alex.



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
Object required??? What object? jlclyde Excel Discussion (Misc queries) 8 November 1st 08 12:21 AM
R/T 424 - Object required Help Jim May Excel Discussion (Misc queries) 2 April 10th 08 03:01 PM
Object Required aftamath Excel Discussion (Misc queries) 2 March 14th 06 10:19 PM
error 424 - Object Required blb Excel Programming 0 October 1st 03 05:32 PM
Object required confusion Stuart[_5_] Excel Programming 5 July 13th 03 07:48 PM


All times are GMT +1. The time now is 05:39 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"