Set focus on document from Userform
With reference to my MergeField Select KB entry, I would like it to "Set Focus" to the document after a mergefield is added. The code to add the field is :
Private Sub ListBox1_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
'Add listbox item to document
ActiveDocument.Fields.Add Range:=Selection.Range, Type:=wdFieldMergeField _
MVP (Excel 2008-2010)
"Provide sample data and layout if you want a quicker solution." - MD
To help indent your macros try Smart Indent
Please remember to mark threads 'Solved'
Can you just unload/hide the User Form or are you trying to do something else?