Hi All,
Excel 2007
I have a 'Control' workbook which has an input worksheet and a data worksheet for each country.
By clicking a button it executes and creates a new Workbook and copies ino it that countries input worksheet and data worksheet, and places it to a file location, which is specified by a cell in the workbook.
Everything works ok, but i do not know how to hide the data worksheet in the new workbook, any ideas?
Here is my code:
Private Sub CommandButton1_Click()
' Italy_Copy_Sheets_Macro
Dim fpath As String
fpath = Worksheets("ControlSheet").Range("B2")
Sheets(Array("ItalyInputTemplate", "ItalyDatasheet")).Select
Sheets(Array("ItalyInputTemplate", "ItalyDatasheet")).Copy
ActiveWorkbook.SaveAs Filename:= _
fpath & "ItalyInputTemplate.xlsm", _
FileFormat:=52, CreateBackup:=False
End Sub
Bookmarks