Hi all,
I cannot run the Type 8 inputbox (for user specified ranges) more than once in my procedure.
In the code below, the first inputbox for rngSource works fine, but clicking the ok button after selecting a range for the second inputbox (rngDest) pops up the following error:
Quote
Run-time error '424':
Object required
I initially thought that the Default option was to blame. So I created a dummy procedure with the command for the first inputbox repeated twice, and got the same error.
Any help would be much appreciated.
Thanks
m
Code
Sub InputBox_For_Ranges()
Dim rngSource As Range, rngDest As Range, rngStartingPoint As Range
Set rngStartingPoint = ActiveCell
Set rngSource = Application.InputBox("Select Source Cell", _
Type:=8, Default:=rngStartingPoint.Address)
Set rngDest = Application.InputBox _
(prompt:="Select Destination (SINGLE CELL ONLY)", _
Type:=8, Default:=rngSource.Offset(0, 1).Address)
End Sub
Display More