Hi JIetoh,
The following was tested in Excel 2003 and worked. I do get a 'Runtime Error 5' if the Debugger window is Open.
Sub DisplayUserform()
Dim sApplicationCaption As String
UserForm1.Show vbModeless
'Get the 'Caption' for the Application
sApplicationCaption = Application.Caption
'Activate the Application (i.e. set focus on Excel)
'NOTE: This will cause Runtime Error 5 if the Debugger is Active
' The Debugger must be CLOSED before this is run
AppActivate sApplicationCaption, False
Range("C5").Select
End Sub
Lewis
Bookmarks