Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Object required??? What object? | Excel Discussion (Misc queries) | |||
R/T 424 - Object required Help | Excel Discussion (Misc queries) | |||
Object Required | Excel Discussion (Misc queries) | |||
error 424 - Object Required | Excel Programming | |||
Object required confusion | Excel Programming |