Open Close workbooks

B

bbc1

HI I have a workbook that user's use to input changed data each day into
severval different worksheets, once data is entered they have to save it as
filename(date) what I need is a macro that will close the saved workbook and
re-open the original.
eg saved worksheet is tallysheet28-8-05 original workbook tallysheet
 
R

Ron de Bruin

Hi bbc1

Look in the VBA for SaveCopyAs
Your origenal workbook stay open and a copy will be saved with the name you want

Dim wb As Workbook
Set wb = ActiveWorkbook
wb.SaveCopyAs "C:\" & wb.Name & " " & Format(Now, "dd-mm-yy h-mm-ss") & ".xls"
 
B

bbc1

Thankyou that works great.

Ron de Bruin said:
Hi bbc1

Look in the VBA for SaveCopyAs
Your origenal workbook stay open and a copy will be saved with the name you want

Dim wb As Workbook
Set wb = ActiveWorkbook
wb.SaveCopyAs "C:\" & wb.Name & " " & Format(Now, "dd-mm-yy h-mm-ss") & ".xls"
 
Top