Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / August 2007

Tip: Looking for answers? Try searching our database.

Save sheet copy with cell value name using a macro.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Leo Rod - 07 Aug 2007 22:21 GMT
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.
Gord Dibben - 07 Aug 2007 22:43 GMT
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

>Good afternoon All,
>
[quoted text clipped - 5 lines]
>
>Leo.

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.