Hi
I'm using Excel 2003 and I'm a newbie at it.
I'm using the following code to copy a workbook to another folder:
Private Sub Workbook_Open()
Sheets(Array("MyWSA", "MyWSB", "MyWSC", "MyWSD")).Copy
Application.DisplayAlerts = False
Application.CutCopyMode = False
ActiveWorkbook.SaveCopyAs Filename:="E:\My Documents\MyFolder\WBCopy_" & Format(Now(), "YYYYMMDD") & ".xls"
ActiveWindow.Close
This is working except I need to know how to write code to the new work book to:
- protect cells from being editable
- hide raw data worksheet (MyWSD)
- deselect the pages
Also, on the first worksheet there is a data validation cell that is for users to select what date from the raw data sheet they wish to view data on. This isn't working in the copy and I don't know why.
Any help greatly appreciated.
I'm using Excel 2003 and I'm a newbie at it.
I'm using the following code to copy a workbook to another folder:
Private Sub Workbook_Open()
Sheets(Array("MyWSA", "MyWSB", "MyWSC", "MyWSD")).Copy
Application.DisplayAlerts = False
Application.CutCopyMode = False
ActiveWorkbook.SaveCopyAs Filename:="E:\My Documents\MyFolder\WBCopy_" & Format(Now(), "YYYYMMDD") & ".xls"
ActiveWindow.Close
This is working except I need to know how to write code to the new work book to:
- protect cells from being editable
- hide raw data worksheet (MyWSD)
- deselect the pages
Also, on the first worksheet there is a data validation cell that is for users to select what date from the raw data sheet they wish to view data on. This isn't working in the copy and I don't know why.
Any help greatly appreciated.