Hi Gurus,
If vbNo , inpboxa & b will become as a range variable, therefore when i put inpboxa.select it will be selected
However if vbYes, inpboxa cant be select. Any quick thoughts for selecting an inpboxa when vbyes? Thanks
If vbNo , inpboxa & b will become as a range variable, therefore when i put inpboxa.select it will be selected
However if vbYes, inpboxa cant be select. Any quick thoughts for selecting an inpboxa when vbyes? Thanks
VBA Code:
Sub test()
answer = MsgBox("Last Range (Yes), New Range(No) ", vbYesNo)
If answer = vbYes Then
inpboxa = Range("b2").Value
inpboxb = Range("b3").Value
ElseIf answer = vbNo Then
Set inpboxa = Application.InputBox(Prompt:="Select a range", Type:=8)
Set inpboxb = Application.InputBox(Prompt:="Select a range", Type:=8)
Range("b2").Value = inpboxa.Address
Range("b3").Value = inpboxb.Address
End If
inpboxa.Select
End Sub