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 / January 2006

Tip: Looking for answers? Try searching our database.

macro to save new file (same as tab name)

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Brian Thompson - 28 Jan 2006 18:12 GMT
Hi

I am recording macro and want to save the new macro- recorded sheet as the
same name as the sheet tab.
I do have the tab name in one of the cells A1, using =cell("filename",A1)
Example : sheet name week1, want to save new file as week1

I Can copy and paste into existing macro
thanks in advance

brian
Bob Phillips - 28 Jan 2006 18:27 GMT
Activeworkbook.SaveAs Filename:=Activesheet.Name

--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)

> Hi
>
[quoted text clipped - 11 lines]
> Message posted via OfficeKB.com
> http://www.officekb.com/Uwe/Forums.aspx/excel-new/200601/1
Brian Thompson - 29 Jan 2006 13:15 GMT
thanks, it worked, however, I do reqiure to save the acutal sheet the i'm
viewing.   In the example below i was in sheet3.

What code do I replace line 3 and 4 to save the actual sheet i'm viewing
before running the macro?

example of pary recorded macro
   ActiveCell.FormulaR1C1 = "3"
   Range("E11").Select
   Sheets("Sheet3").Select
   Sheets("Sheet3").Copy
   Range("E14").Select
   Sheets("Sheet3").Select
   ActiveWorkbook.SaveAs Filename:= _

>Activeworkbook.SaveAs Filename:=Activesheet.Name
>
[quoted text clipped - 11 lines]
>>
>> brian
Bob Phillips - 29 Jan 2006 22:10 GMT
What exactly do you mean by save the sheet? Normally, one saves a workbook,.
a sheet is part, but not all , of a workbook.

--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)

> thanks, it worked, however, I do reqiure to save the acutal sheet the i'm
> viewing.   In the example below i was in sheet3.
[quoted text clipped - 30 lines]
> Message posted via OfficeKB.com
> http://www.officekb.com/Uwe/Forums.aspx/excel-new/200601/1
Brian Thompson - 30 Jan 2006 15:13 GMT
Hi Bob

Will save workbook in usual way.  then will copy sheet, paste special, format
and then save as the tab name.  This new sheet(wkbook) will then be sent via
mail.

The last line does work, however, only keeps saving "sheet3"

What do I replace "Sheet3" (see below) with to save selected sheet I am
veiwing at the time

Sheets("Sheet3").Select
   Range("A1").Select
   ActiveWorkbook.SaveAs Filename:=ActiveSheet.Name

thanks for your patience !

regards

Brian

>What exactly do you mean by save the sheet? Normally, one saves a workbook,.
>a sheet is part, but not all , of a workbook.
[quoted text clipped - 12 lines]
>> >>
>> >> brian
 
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.