Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Automate File Naming Function in sequence

I created a module and inserted the code into the template.

I've inserted the code into a new module, (Nothing happened)
Inserted the code in the workbook area, nothing happened.
Inserted the code into the Sheet name area and still nothing happened.

Actually, what i might do is put it in the macro when I open up the
sheet via the toolbars.

Sub GetNewFileName()
Dim NFile As Integer, FNo As Long
NFile = FreeFile()
Open "C:\Zemd.Txt" For Input As #NFile
Input #NFile, FNo
Close #NFile
Open "C:\Zemd.Txt" For Output As #NFile
Print #NFile, FNo + 1
Close #NFile

ActiveWorkbook.SaveAs Filename:="H:\REGISTRATIONS\ZEMD\DAILY
SUMMARY\ZEMD" & FNo

End Sub



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
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
In Excel 2003, how do I automate file naming/saving + date? MichaelOfficer Setting up and Configuration of Excel 1 July 19th 09 01:46 PM
how to automate excel file sending by outlook from within the file Adrian Excel Discussion (Misc queries) 1 September 12th 08 01:59 PM
Would Like to Automate Batch File Creation and Text FIle Import socrtwo Excel Discussion (Misc queries) 2 August 18th 06 03:54 PM
automate the tab naming philtyler Excel Discussion (Misc queries) 1 May 10th 06 06:44 PM
How can I automate the naming of worksheet tabs? TJ Excel Discussion (Misc queries) 7 September 8th 05 12:01 AM


All times are GMT +1. The time now is 01:06 PM.

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

About Us

"It's about Microsoft Excel"