Gary''s Student said:
Consider the following macro in an Excel worksheet:
Sub demonstration()
Dim r As Range
Set r = Application.InputBox(prompt:="Please enter the range",
Type:=8)
r.Interior.ColorIndex = 3
End Sub
This will allow the User to either select the range by using the mouse
or by
typing in the inputbox.
Excel 2003 SP3; XP Pro SP3
The above code throws Runtime error 424, "Object Rquired" when I try it.
The input box comes up, I can select cells with the mouse, which causes
the range address to appear in the input box. The error pops when I
click OK. (The locals window shows r as a range containing nothing.)
Any suggestions?