I know what the error 339 means, but in my software I place this link on a button:
In the option explicit I have the following, is there something else that needs to be added, because I get the error 339 when I add the above to a button, then when I hit quit I get the error, without the code when i hit quit, it just closes and no error:Code:ShellExecute Me.hWnd, "Open", "http://www.google.com", 0&, 0&, SW_NORMAL
What am I missing?Code:Option Explicit Option Compare Text Private Declare Function InitCommonControls Lib "comctl32.dll" () As Long Private WinsockHTML As String 'Constants for use in 'shellexecute' Const SW_NORMAL = 1 Const SW_SHOW = 5 'The shell execute API declarations Private 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 'window thingy Private Const HWND_TOPMOST = -1 Private Const HWND_NOTOPMOST = -2 Private Const SWP_NOSIZE = &H1 Private Const SWP_NOMOVE = &H2 Private Const SWP_NOACTIVATE = &H10 Private Const SWP_SHOWWINDOW = &H40 'declare API Private Declare Sub SetWindowPos Lib "user32" (ByVal hWnd As Long, _ ByVal hWndInsertAfter As Long, ByVal X As Long, ByVal Y As Long, _ ByVal cX As Long, ByVal cY As Long, ByVal wFlags As Long)
Thank you.




Reply With Quote