Save sheet copy with cell value name using a macro.

  • Thread starter Thread starter Leo Rod
  • Start date Start date
L

Leo Rod

Good afternoon All,

I need a VB statement to save a copy of the sheet i'm using (same were the
macro is executed) with a cell value (EG cell "B2") of the workbook I'm
using into a predefined path (EG "C:\").

If anybody can help me with this I'll be very glad.

Leo.
 
You want to save a sheet as a workbook with a name of the value in Range("B2")
of the sheet?

Sub Make_New_Book()
Dim w As Worksheet
Application.ScreenUpdating = False
Application.DisplayAlerts = False
ActiveSheet.Copy
ActiveWorkbook.SaveAs Filename:="C:\MyFolder\" & Range("B2").Value
ActiveWorkbook.Close
Application.DisplayAlerts = True
Application.ScreenUpdating = True
End Sub


Gord Dibben MS Excel MVP
 
Back
Top