Desktop icon

  • Thread starter Thread starter oldjay
  • Start date Start date
I get the following compile error when I try to run this
"Constants,fixed- length strings,arrays, user dedined type and Declare
statementsnot allowed as Public member of object modules"

Const SW_SHOW = 1
Const SW_SHOWMAXIMIZED = 3

Public Declare Function ShellExecute Lib "Shell32.dll" 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


Sub test()

IConName = "Customers.mdb - Shortcut"

HomePath = Environ("HomeDrive") & Environ("Homepath")
DeskTop = HomePath & "\" & "DeskTop"


RetVal = ShellExecute(0, "open", IConName, "<arguments>", _
DeskTop, SW_SHOWMAXIMIZED)


End Sub
 
Back
Top