J
Julia
Hi,
I have a template that has a user form...one of the options on the user form
allows the user to "paste from clipboard". However, if they accidentally
click this option without having anything on the clipboard, they get an
error. I want them to see a message box instead. So far I have:
Original code:
If frmSelect.boxPaste = True Then
Selection.HomeKey Unit:=wdStory
Selection.GoTo what:=wdGoToBookmark, Name:="bkRecName"
Selection.PasteAndFormat (wdPasteDefault)
Selection.Delete Unit:=wdCharacter, Count:=1
End If
I want to say:
If nothing is on the clipboard then instead of an error message _
Msgbox (“You must select and copy text firstâ€)
End if
Any ideas?? Thanks!
I have a template that has a user form...one of the options on the user form
allows the user to "paste from clipboard". However, if they accidentally
click this option without having anything on the clipboard, they get an
error. I want them to see a message box instead. So far I have:
Original code:
If frmSelect.boxPaste = True Then
Selection.HomeKey Unit:=wdStory
Selection.GoTo what:=wdGoToBookmark, Name:="bkRecName"
Selection.PasteAndFormat (wdPasteDefault)
Selection.Delete Unit:=wdCharacter, Count:=1
End If
I want to say:
If nothing is on the clipboard then instead of an error message _
Msgbox (“You must select and copy text firstâ€)
End if
Any ideas?? Thanks!