A
avkokin
Hello.
How to handle of pressing button "Cancel" from dialogue InputBox? In
my code when user press button "Cancel" dispaly Msgbox from cycle Do
While. I need to cancel all action. See my code:
Sub movePic()
Dim Message As String
On Error Resume Next
If Selection.Type = wdSelectionInlineShape Then
Selection.InlineShapes(1).ConvertToShape
End If
If Selection.Type = wdSelectionIP Then
MsgBox "Please select your image"
Else
Do While Message = ""
Message = InputBox("Please enter the number." & _
vbCr & "...", _
"Move image", "")
If Message = "" Then
MsgBox "Please enter the number"
End If
Loop
Selection.ShapeRange.IncrementLeft MillimetersToPoints(Message)
End If
End Sub
Thank you very much!
How to handle of pressing button "Cancel" from dialogue InputBox? In
my code when user press button "Cancel" dispaly Msgbox from cycle Do
While. I need to cancel all action. See my code:
Sub movePic()
Dim Message As String
On Error Resume Next
If Selection.Type = wdSelectionInlineShape Then
Selection.InlineShapes(1).ConvertToShape
End If
If Selection.Type = wdSelectionIP Then
MsgBox "Please select your image"
Else
Do While Message = ""
Message = InputBox("Please enter the number." & _
vbCr & "...", _
"Move image", "")
If Message = "" Then
MsgBox "Please enter the number"
End If
Loop
Selection.ShapeRange.IncrementLeft MillimetersToPoints(Message)
End If
End Sub
Thank you very much!