Opening A VB Project File From A VB 6.0
Today morning I need to create an application which is build in VB 6.0 and I wanted to open another VBP file from my existing project.
I Googled it a lot but couldn't found anything, however I managed to achieve it anyhow, so this would be helpful to you also.
On Button Click, It will open a new VBP Project.
Code: VB 6.0
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 Sub Form_Load()
'open a file
ShellExecute Me.hWnd, "open", "C:\Test1.vbp", vbNullString, "C:\", ByVal 1&
Private Sub OpenAFile(strFileLocation As String)
'Just call the OpenAFile sub with the path of the file to open as its parameter.
If Dir$(strFileLocation) = "" Then
ShellExecute Me.hWnd, "open", strFileLocation, vbNullString, "C:\", ByVal 1&
'Example code (same effect as the examples above)
Private Sub Command1_Click()