Hello
I am having a little trouble with opening up a template, well the template opens but then does not go on to the next line of code.
i have simplified it down to this, the message boxes were to check if there are values in the variables. the first message box display is right (file path stored in the worksheet), and then the template is opened as a new file, but then it just stops. the next message box is not displayed, and no matter what the next line of code is, it is not done!
after the template is opened i need to go on to copy values into it automatically, but the code stops for no reason.
Public Sub OpenTemplate()
TemplateFileName = Sheets("WorkbookInfo"
.Range("TemplateName"
.Value
MsgBox TemplateFileName
Workbooks.Add Template:=TemplateFileName
FileTemplate = ActiveWorkbook.name
MsgBox FileTemplate
End Sub
anyone have ANY ideas at all???
cheers
I am having a little trouble with opening up a template, well the template opens but then does not go on to the next line of code.
i have simplified it down to this, the message boxes were to check if there are values in the variables. the first message box display is right (file path stored in the worksheet), and then the template is opened as a new file, but then it just stops. the next message box is not displayed, and no matter what the next line of code is, it is not done!
after the template is opened i need to go on to copy values into it automatically, but the code stops for no reason.
Public Sub OpenTemplate()
TemplateFileName = Sheets("WorkbookInfo"
MsgBox TemplateFileName
Workbooks.Add Template:=TemplateFileName
FileTemplate = ActiveWorkbook.name
MsgBox FileTemplate
End Sub
anyone have ANY ideas at all???
cheers