Drop-Downs: Run Macro on Exit
It appears that a macro that I have set up to run "on exit" from a drop-down list is not executing. At present, I am simply interested in learning how to get any macro to run on exit. Here is the macro that I have set up to run on exit:
Sub PrintTextonSelection()
ActiveDocument.Unprotect
Dim MyText As String
MyText = "I made a selection"
Selection.TypeText (MyText)
End Sub
To test, I first protected the file (in order to allow use of the drop-down) and then made a selection. Result: the "I made a selection" text was not inserted nor did the document transition to an unprotected state.
I am a complete novice re VBA and macros. Any suggestions welcomed.
|