Gurus,

I have a macro that uses an Application.InputBox. All works well, thanks to users of this forum, except when the user selects Cancel on the input box. I am looking for the code to exit the macro when the cancel button is selected.

Looking through the forum, I have added the BOLD lines but I just don't know enough about VB as to what to define the strButton to. Or even if I am doing this correctly.

Can someone guide me?

TIA,
Tim

Sub Transfer_Info()
'
' Transfer_Info Macro
'

'
  Dim strButton As String
  
    Range("B70:J72").Select
    Selection.CopyPicture Appearance:=xlScreen, Format:=xlPicture
    Range("AJ4").Select
    ActiveSheet.Paste
    Selection.ShapeRange.ScaleWidth 0.55, msoFalse, msoScaleFromTopLeft
    Selection.ShapeRange.ScaleHeight 0.55, msoFalse, msoScaleFromTopLeft
    Range("AI3:AN8").Select
    Range("AM5").Activate
    Selection.CopyPicture Appearance:=xlScreen, Format:=xlPicture
    ActiveWindow.SmallScroll ToRight:=-17
    Range("D2").Select
    Workbooks.Open Filename:= _
        "\\vmfiles\CAD\MASTER QUOTE LIST.xlsm"
    Set Rng = Application.InputBox(prompt:="select range to paste", Type:=8)
    If strButton = "False" Then Exit Sub
    Rng.Parent.Select
    Rng.Select
    ActiveSheet.Pictures.Paste.Select
    Range("N1").Select
    
End Sub