L
Leanne M (Aussie)
Hi,
I have code to open a file in a command button which works fine.
What I would like to do is allow this button to also switch to this file if
it is already open.
I do not know how to write this so detailed help would be apprecitated.
This is the code I have for opening the file.
Private Sub CommandButton3_Click()
ChDir "C:\My Documents\Pest Control Management System"
Workbooks.Open Filename:= _
"C:\My Documents\Pest Control Management System\Pest Control
Reporting Tool.xls"
End Sub
I have code to open a file in a command button which works fine.
What I would like to do is allow this button to also switch to this file if
it is already open.
I do not know how to write this so detailed help would be apprecitated.
This is the code I have for opening the file.
Private Sub CommandButton3_Click()
ChDir "C:\My Documents\Pest Control Management System"
Workbooks.Open Filename:= _
"C:\My Documents\Pest Control Management System\Pest Control
Reporting Tool.xls"
End Sub