ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Object required - run time error 424. (https://www.excelbanter.com/excel-programming/294752-object-required-run-time-error-424-a.html)

devorivivere

Object required - run time error 424.
 
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.

Thanks, Alex.




Tom Ogilvy

Object required - run time error 424.
 
If you click cancel, then you won't return a range and your set statement
will produce that error.

Harald Staff gave you some sample code in a previous post.

--
Regards,
Tom Ogilvy


"devorivivere" wrote in message
...
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.

Thanks, Alex.






y

Object required - run time error 424.
 
I always selected the range with my mouse and the clicked OK.
I never closed the msgbox with the "X" at upright position.

Tom Ogilvy wrote:

If you click cancel, then you won't return a range and your set statement
will produce that error.

Harald Staff gave you some sample code in a previous post.



Tom Ogilvy

Object required - run time error 424.
 
And I have never gotten this error using code similar to Harald's.

--
Regards,
Tom Ogilvy


"y" wrote in message ...
I always selected the range with my mouse and the clicked OK.
I never closed the msgbox with the "X" at upright position.

Tom Ogilvy wrote:

If you click cancel, then you won't return a range and your set

statement
will produce that error.

Harald Staff gave you some sample code in a previous post.






All times are GMT +1. The time now is 01:09 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com