Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default Saving a File Generates a Sequential Number Name

Again, for those who have been helping me THANKS again. I
am almost there.

The client wants that when you save the file, it looks in
the folder they are to be saved in, and generates a
sequential number as a file name, which would then display
as a PO number in the workbook in a cell, if that makes
sense.

Any ideas?

Thanks!
Shauna
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default Saving a File Generates a Sequential Number Name

Hi Shauna,

If I understand what the situation is correctly this
could be the solution. "PO_Number" is the cell in excel
that would match the file name. It starting number is up
to you to decide. I would lock it for manual editing. So
each time you click on a button to save the information
the PO_Number's value would increase by one and this
would be the files name.

Public Sub SaveAs()

Dim DestinationFile As Integer

'select the cell that reflects the PO number in the
workbook
Range("PO_Number").Select
'set the cell to the next seq number (PO Number)
ActiveCell = ActiveCell + 1
'Define the Target File Name
DestinationFile = ActiveCell
ActiveWorkbook.SaveCopyAs "\\your path\" &
DestinationFile & ".xls"

End Sub
-----Original Message-----
Again, for those who have been helping me THANKS again.

I
am almost there.

The client wants that when you save the file, it looks

in
the folder they are to be saved in, and generates a
sequential number as a file name, which would then

display
as a PO number in the workbook in a cell, if that makes
sense.

Any ideas?

Thanks!
Shauna
.

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
how do I insert a sequential number to a cell each time the file i Steven Jones[_2_] New Users to Excel 2 July 20th 08 12:26 PM
How to make excel sheet generates an auto number ghost Excel Discussion (Misc queries) 3 July 23rd 07 03:08 PM
Loosing value of large number when saving file to CSV format Kim Luu Excel Discussion (Misc queries) 2 May 1st 06 02:40 PM
Saving templates with sequential numbers Hershey Excel Discussion (Misc queries) 1 July 13th 05 10:33 PM
Excel 2000 file when opened in Excel 2003 generates errors? Doug Excel Discussion (Misc queries) 13 December 25th 04 10:20 PM


All times are GMT +1. The time now is 04:50 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"