Option
Explicit
Private
Declare
Function
ShellExecute
Lib
"shell32"
_
Alias
"ShellExecuteA"
( _
ByVal
hWnd
As
Long
, _
ByVal
lpOperation
As
String
, _
ByVal
lpFile
As
String
, _
ByVal
lpParameters
As
String
, _
ByVal
lpDirectory
As
String
, _
ByVal
nShowCmd
As
Long
)
As
Long
Private
Sub
CommandButton1_Click()
Call
ShellExecute(0,
"runas"
,
"notepad.exe"
,
""
, CurDir$(), vbNormalFocus)
End
Sub