C
Carole
My UserForm has a command button to create a summary at
the top of the active document (say DocA.doc). Because my
UF is set to ShowModal = false, I am looking for a way to
return the focus to DocA.doc when the user pushes the
cmdCreateSummary button otherwise the summary gets
recorded on whatever document is active at the time. So I
use this to identify the original document (DocA.doc):
Private Sub UserForm_Activate()
Static strActiveDoc
strActiveDoc = ActiveDocument.Path & _
Application.PathSeparator & ActiveDocument.Name
End Sub
Then when the user pushes cmdCreateSummary, my first line
of code is this:
Windows(strActiveDoc).Activate
but it does not work. What is wrong with this
logic/syntax or does anyone have a better alternative.
Thank you.
Carole
the top of the active document (say DocA.doc). Because my
UF is set to ShowModal = false, I am looking for a way to
return the focus to DocA.doc when the user pushes the
cmdCreateSummary button otherwise the summary gets
recorded on whatever document is active at the time. So I
use this to identify the original document (DocA.doc):
Private Sub UserForm_Activate()
Static strActiveDoc
strActiveDoc = ActiveDocument.Path & _
Application.PathSeparator & ActiveDocument.Name
End Sub
Then when the user pushes cmdCreateSummary, my first line
of code is this:
Windows(strActiveDoc).Activate
but it does not work. What is wrong with this
logic/syntax or does anyone have a better alternative.
Thank you.
Carole