I have the code to open a web page when a button is clicked, but it just changes the current IE window. How do I modify this code to open the page in a new window?
VB Code:
Option Explicit 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 Private Const SW_SHOWNORMAL As Long = 1 Private Const SW_SHOWMINIMIZED As Long = 2 Private Const SW_SHOWMAXIMIZED As Long = 3
and the button code:
VB Code:
Private Sub cmdCRKC_Click() ShellExecute Me.hwnd, "Open", "http://localhost/indexCRKCG1_G2.asp", vbNullString, "C:\", SW_SHOWNORMAL End Sub




Reply With Quote