I'm sure this is a really easy question to answer.
I have a macro that creates a new worksheet from customtemplate.xltm
The code works fine.
Unfortunately, I can't really send this workbook to others without having to hardcode the location of the template.
The (partial) code I'm using includes:
Sheets.Add(After:=Worksheet, Type:="C:\Users\MyUserName\Desktop\customtemplate.xltm")
I would like the code to be something to the effect of:
Sheets.Add(After:=Worksheet, Type:="[current directory of workbook]\customtemplate.xltm")
what is the proper way to write this in a macro?
I have a macro that creates a new worksheet from customtemplate.xltm
The code works fine.
Unfortunately, I can't really send this workbook to others without having to hardcode the location of the template.
The (partial) code I'm using includes:
Sheets.Add(After:=Worksheet, Type:="C:\Users\MyUserName\Desktop\customtemplate.xltm")
I would like the code to be something to the effect of:
Sheets.Add(After:=Worksheet, Type:="[current directory of workbook]\customtemplate.xltm")
what is the proper way to write this in a macro?