Workbook add, reqest name

I

ianripping

I want a macro to add a workbook using: -

Workbooks.Add
But then uses a cell (eg A1) to create its name with a descrtiptio
afterwards.

Eg a1 = January
Description is " - Monthly Stats"

Any body got the answer
 
I

ianripping

ok is it possible to save the workbook with a name entered into a cell?

also can you use a cell refernce to rename a sheet name
 
R

Rob van Gelder

Filename in A1
Sheetname in A2

Sub test()
Application.DisplayAlerts = False
ThisWorkbook.SaveAs "C:\" & Range("A1").Value & ".xls"
Application.DisplayAlerts = True

Worksheets(1).Name = Range("A2").Value
End Sub


DisplayAlerts prevents the warning "a file already exists with this name"
 
Top