G
Guest
Hi
I use this in a command button to open another excel file:
Dim FName As Variant
Dim sStr As String
sStr = "h:\city breaks\priser\usa\ordrer"
ChDrive sStr
ChDir sStr
FName = Application.GetOpenFilename("Excel Files (*.xls),*.xls")
If FName <> False Then
Workbooks.Open FName
End If
Its working but when i close the file i have open with the botton its also
close the first woorbook i have open. All workbooks have this in the start:
Private Sub Workbook_open()
copy
Application.Visible = False
GetData_Example1
priser.Show ' show my form
Application.DisplayAlerts = False
Application.Quit
End Sub
So my question is, is there not another way to open the second file?
Maybe with filesystemobject ??
Best regards
alvin
I use this in a command button to open another excel file:
Dim FName As Variant
Dim sStr As String
sStr = "h:\city breaks\priser\usa\ordrer"
ChDrive sStr
ChDir sStr
FName = Application.GetOpenFilename("Excel Files (*.xls),*.xls")
If FName <> False Then
Workbooks.Open FName
End If
Its working but when i close the file i have open with the botton its also
close the first woorbook i have open. All workbooks have this in the start:
Private Sub Workbook_open()
copy
Application.Visible = False
GetData_Example1
priser.Show ' show my form
Application.DisplayAlerts = False
Application.Quit
End Sub
So my question is, is there not another way to open the second file?
Maybe with filesystemobject ??
Best regards
alvin