I have an application that requires two workbooks to be open.
Workbook one is named "Data"
It is used to generate two spreadsheets that are then copied to a new workbook that vba creates I then want to save that workbook as SalesData_08272011. That workbook is then mailed to a number of folk (that part is working fine)
It is the save as that I am having trouble with
dateid is the variable for the date string at end of file
The following code doesn't halt the program it crashes excel - - no idea why
wName = Workbooks.Item(2).Name
Workbooks(wName).SaveAs Filename:="C:\Sales\PaywallActivity" & "_" & dateid & ".xls"
Any help would be appreciated.
Jim
Workbook one is named "Data"
It is used to generate two spreadsheets that are then copied to a new workbook that vba creates I then want to save that workbook as SalesData_08272011. That workbook is then mailed to a number of folk (that part is working fine)
It is the save as that I am having trouble with
dateid is the variable for the date string at end of file
The following code doesn't halt the program it crashes excel - - no idea why
wName = Workbooks.Item(2).Name
Workbooks(wName).SaveAs Filename:="C:\Sales\PaywallActivity" & "_" & dateid & ".xls"
Any help would be appreciated.
Jim