L
Ludo
Hi,
I have a template in a TEMPLATE folder on a network drive.
I could open this with a shortcut, and a copy of the template opened
as expected.
Because some settings could change (worksheet in the template), i made
it possible to save the template with the code below (Private Sub
CommandButton1_Click() )
I did make some changes in the setting and saved the template.
From then on started the problem that the template itself opens
instead of a copy.
I'm running on Win XP Professional Version 2002 SP2 & Office 2003 SP3.
Here's the macro to open the template on the network drive.
Sub OpenHassOpvolgblad()
ChDir "\\bvwsrv01\BVW\AV\Operations\HASS\2.Utility and Log file"
Workbooks.Open FileName:="\\bvwsrv01\BVW\AV\Operations\HASS
\2.Utility and Log file\Templates\HASS.xlt", Editable:=False,
Notify:=False
End Sub
In my template i have following code:
Public Const UtilityTemplatePath = "\\bvwsrv01\BVW\AV\Operations\HASS
\2.Utility and Log file\Templates\HASS.xlt"
Private Sub CommandButton1_Click()
' save settings
Application.DisplayAlerts = False
ThisWorkbook.SaveAs FileName:=UtilityTemplatePath
Unload Me
End Sub
Any clue what could have gone wrong, or is the above commandbutton
code the origine of the problem?
Any help welcome.
Ludo
I have a template in a TEMPLATE folder on a network drive.
I could open this with a shortcut, and a copy of the template opened
as expected.
Because some settings could change (worksheet in the template), i made
it possible to save the template with the code below (Private Sub
CommandButton1_Click() )
I did make some changes in the setting and saved the template.
From then on started the problem that the template itself opens
instead of a copy.
I'm running on Win XP Professional Version 2002 SP2 & Office 2003 SP3.
Here's the macro to open the template on the network drive.
Sub OpenHassOpvolgblad()
ChDir "\\bvwsrv01\BVW\AV\Operations\HASS\2.Utility and Log file"
Workbooks.Open FileName:="\\bvwsrv01\BVW\AV\Operations\HASS
\2.Utility and Log file\Templates\HASS.xlt", Editable:=False,
Notify:=False
End Sub
In my template i have following code:
Public Const UtilityTemplatePath = "\\bvwsrv01\BVW\AV\Operations\HASS
\2.Utility and Log file\Templates\HASS.xlt"
Private Sub CommandButton1_Click()
' save settings
Application.DisplayAlerts = False
ThisWorkbook.SaveAs FileName:=UtilityTemplatePath
Unload Me
End Sub
Any clue what could have gone wrong, or is the above commandbutton
code the origine of the problem?
Any help welcome.
Ludo