I have 4 buttons on a form, each of which open a different file in a single external application. When I click the button to open File 1, the external application and file open on top as desired. After doing some work on that file, I minimize the external application and return to my Access form. When I later wish to open File 2 in the external application, I click on that button and the file opens but the external application remains minimized. Would it be possible to have the external application and file open on top every time a "open file" button is clicked? This is the code I have to open each file thus far:
Private Sub Open File 1_Click()
Dim X As Variant
Dim Path As String
Dim File As String
Dim a As Long
a = 1
Path = "C:\Program Files\Chief Architect\Chief Architect Premier X5 (64 bit)\Chief Architect Premier X5.exe"
If a = 1 Then
File = [File1]
X = Shell(Path + " " + File, vbMaximizedFocus)
Else
MsgBox "Error"
End If
End Sub
Thank you in advance.
Private Sub Open File 1_Click()
Dim X As Variant
Dim Path As String
Dim File As String
Dim a As Long
a = 1
Path = "C:\Program Files\Chief Architect\Chief Architect Premier X5 (64 bit)\Chief Architect Premier X5.exe"
If a = 1 Then
File = [File1]
X = Shell(Path + " " + File, vbMaximizedFocus)
Else
MsgBox "Error"
End If
End Sub
Thank you in advance.