K
ker_01
From the Excel 2003 helpfile on the Inputbox method:
********************************************
If Type is 8, InputBox returns a Range object. You must use the Set
statement to assign the result to a Range object, as shown in the following
example.
Set myRange = Application.InputBox(prompt := "Sample", type := 8)
If you don't use the Set statement, the variable is set to the value in the
range, rather than the Range object itself.
********************************************
So I create a simple test case:
Sub MyTest
Dim myRange as Range
Set myRange = Application.InputBox(prompt := "Sample", type := 8)
End Sub
When I run it and select a range it gives me a 424 'Object required' error.
I need to capture the range (then verify that the range only contains one
column, and return that column) so that I can use that column in my sub, but
I haven't been able to accurately capture the range.
Can anyone provide any pointers or hints to help me troubleshoot?
Thanks!
Keith
********************************************
If Type is 8, InputBox returns a Range object. You must use the Set
statement to assign the result to a Range object, as shown in the following
example.
Set myRange = Application.InputBox(prompt := "Sample", type := 8)
If you don't use the Set statement, the variable is set to the value in the
range, rather than the Range object itself.
********************************************
So I create a simple test case:
Sub MyTest
Dim myRange as Range
Set myRange = Application.InputBox(prompt := "Sample", type := 8)
End Sub
When I run it and select a range it gives me a 424 'Object required' error.
I need to capture the range (then verify that the range only contains one
column, and return that column) so that I can use that column in my sub, but
I haven't been able to accurately capture the range.
Can anyone provide any pointers or hints to help me troubleshoot?
Thanks!
Keith