Skip to content

Instantly share code, notes, and snippets.

@agbishara
Created April 15, 2014 16:06
Show Gist options
  • Save agbishara/10744234 to your computer and use it in GitHub Desktop.
Save agbishara/10744234 to your computer and use it in GitHub Desktop.
Create a workbook at a path
Function CreateWorkbook(Path As String) As Workbook
Dim Tempbook As Workbook
Set Tempbook = Workbooks.Add(ThisWorkbook.Path & "\template.xlsx")
Application.DisplayAlerts = False
Tempbook.SaveAs Filename:=Path
Application.DisplayAlerts = True
Set CreateWorkbook = Tempbook
End Function
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment