Может быть:
Sub me_test()
Dim rng1 As Range
Set rng1 = Application.InputBox("Please Select Your Range :", xtitledID, Selection.Address, Type:=8)
If Union(rng1, Range("B7:B15")).Address = Range("B7:B15").Address Then
rng1.Value = "Good"
Else
MsgBox "Not within the perscribed range." & vbCr & "Please click OK to continue."
End If
MsgBox "All Done"
End Sub
Вы также можете проверить правильность выбора используемого диапазона:
Sub me_test()
Dim rng1 As Range
Do
Set rng1 = Application.InputBox("Please Select Your Range :", xtitledID, Selection.Address, Type:=8)
Loop While rng1 Is Nothing
If Union(rng1, Range("B7:B15")).Address = Range("B7:B15").Address Then
rng1.Value = "Good"
Else
MsgBox "Not within the perscribed range." & vbCr & "Please click OK to continue."
End If
MsgBox "All Done"
End Sub