Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Auto file naming with macro

Hi,

I have a macro that rearranges the info in a file the way I want it. I
would to be able to save the updated file automatically using a static
beginning then adding a name part from within the worksheet. I don't want to
"SaveAs"; I want to overwrite the original file

For example: I want the file named "Account changes for 0XXX" where XXX
would be Left(C2, 3)

Any help is appreciated
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,836
Default Auto file naming with macro

Can you get this to work?

Sub Macro1()
Dim SaveHere As Variant
SaveHere = Range("B2")
ActiveWorkbook.SaveAs Filename:= _
"C:\SaveHere.xls", FileFormat:=xlExcel8
End Sub


Regards,
Ryan---
--
RyGuy


"Matt G" wrote:

Hi,

I have a macro that rearranges the info in a file the way I want it. I
would to be able to save the updated file automatically using a static
beginning then adding a name part from within the worksheet. I don't want to
"SaveAs"; I want to overwrite the original file

For example: I want the file named "Account changes for 0XXX" where XXX
would be Left(C2, 3)

Any help is appreciated

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default Auto file naming with macro

Hi Matt

Greetings. Please try the below code

Application.DisplayAlerts = False
ActiveWorkbook.SaveAs "c:\Account changes for 0" & Left(Range("C2"), 3)
Application.DisplayAlerts = True

Cheers!!

"Matt G" wrote:

Hi,

I have a macro that rearranges the info in a file the way I want it. I
would to be able to save the updated file automatically using a static
beginning then adding a name part from within the worksheet. I don't want to
"SaveAs"; I want to overwrite the original file

For example: I want the file named "Account changes for 0XXX" where XXX
would be Left(C2, 3)

Any help is appreciated

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Auto Naming Worksheets Will Cendrowski[_2_] Excel Discussion (Misc queries) 4 October 23rd 09 02:03 PM
Auto file naming Jacquesvv Excel Discussion (Misc queries) 1 June 23rd 09 02:57 PM
file naming during auto-saveas SJW_OST[_2_] Excel Programming 3 July 6th 08 06:07 PM
Check cells for 'Auto Save As' file naming Shinka Excel Programming 3 October 19th 05 04:16 PM
Macro to call a file that has a auto open macro in the file itself [email protected] Excel Programming 1 August 5th 05 06:39 AM


All times are GMT +1. The time now is 11:53 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"