Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Automatically Generate a unique file name...

I have an excel (XP version) application in use on a
network. The app is being run by 50+ different users,
and currently they output the final result sheet to a
printer on completion.

I would like to save some trees and instead of printing
the output, I would like to save it to a folder on the
network. The problem is, each user prints between 5 &
10 of these sheets per shift.

Not all of the users are computer savvy, so in order to
avoid everyone saving their files over everyone elses, I
would need to write a macro that would save the file
automatically to a specific folder. At the same time it
would also need to generate a unique file name for each
individual user!

Does anyone know if this is possible, and can you give me
any pointers please?

Thanks in advance.

Ian
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 280
Default Automatically Generate a unique file name...

some ideas

GetTempName Method of the FileSystemObject
(Reference Microsoft Scripting Runtime - scrrun.dll)

http://msdn.microsoft.com/library/en...temobject.asp?

http://support.microsoft.com/?id=kb;en-us;Q195763

http://www.mvps.org/vbnet/code/filea...mpfilename.htm


I sometimes use Format() to create file names that change by the second. It
has the advantage, if it matters, that the file names are numbered
sequentially by date and time:

fn = "MyFile_" & Format(Now(),"yyyymmddhhmmss") & ".ext"

You could also make creative use of Rnd().

Bob Kilmer

"Ian L" wrote in message
...
I have an excel (XP version) application in use on a
network. The app is being run by 50+ different users,
and currently they output the final result sheet to a
printer on completion.

I would like to save some trees and instead of printing
the output, I would like to save it to a folder on the
network. The problem is, each user prints between 5 &
10 of these sheets per shift.

Not all of the users are computer savvy, so in order to
avoid everyone saving their files over everyone elses, I
would need to write a macro that would save the file
automatically to a specific folder. At the same time it
would also need to generate a unique file name for each
individual user!

Does anyone know if this is possible, and can you give me
any pointers please?

Thanks in advance.

Ian



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Automatically Generate a unique file name...

Thisworkbook.SaveAs "X:\SpecialFolder\ & "ABC" & _
format(now,"yyyymmdd_hhmm") & ".xls"

Regards,
Tom Ogilvy


Ian L wrote in message
...
I have an excel (XP version) application in use on a
network. The app is being run by 50+ different users,
and currently they output the final result sheet to a
printer on completion.

I would like to save some trees and instead of printing
the output, I would like to save it to a folder on the
network. The problem is, each user prints between 5 &
10 of these sheets per shift.

Not all of the users are computer savvy, so in order to
avoid everyone saving their files over everyone elses, I
would need to write a macro that would save the file
automatically to a specific folder. At the same time it
would also need to generate a unique file name for each
individual user!

Does anyone know if this is possible, and can you give me
any pointers please?

Thanks in advance.

Ian



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Automatically Generate a unique file name...

Thanks Tom & Bob. That helps a lot.

Ian ;o)
-----Original Message-----
I have an excel (XP version) application in use on a
network. The app is being run by 50+ different users,
and currently they output the final result sheet to a
printer on completion.

I would like to save some trees and instead of printing
the output, I would like to save it to a folder on the
network. The problem is, each user prints between 5 &
10 of these sheets per shift.

Not all of the users are computer savvy, so in order to
avoid everyone saving their files over everyone elses, I
would need to write a macro that would save the file
automatically to a specific folder. At the same time it
would also need to generate a unique file name for each
individual user!

Does anyone know if this is possible, and can you give

me
any pointers please?

Thanks in advance.

Ian
.

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 generate a unique reference number??? Rachel Excel Discussion (Misc queries) 3 November 21st 08 03:56 AM
automatically generate unique serial numbers for invoices nhlanhla Excel Worksheet Functions 1 October 2nd 08 12:50 PM
How can excel generate every unique pair from a set of numbers? mistermat Excel Worksheet Functions 3 August 31st 08 12:52 PM
How can I generate a unique number each time a form is printed? homaxlinda Excel Worksheet Functions 1 August 17th 06 09:52 PM
generate unique random numbers Stephen Larivee New Users to Excel 7 March 29th 06 01:04 AM


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