View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Rob van Gelder[_4_] Rob van Gelder[_4_] is offline
external usenet poster
 
Posts: 1,236
Default Workbook add, reqest name

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"


--
Rob van Gelder - http://www.vangelder.co.nz/excel


"ianripping " wrote in message
...
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?


---
Message posted from http://www.ExcelForum.com/