Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default How do I set a macro in excel to save to a web site

Hi there,
I have a macro which saves my workbook to a web site and send me an email
notification this is done. What I am going to need however is to have the
file name change each time it is saved to my location so it is not being
overwritten before I can pull the information.
Any ideas would be greatly appreciated.
Thanks,
Mary
--
MT
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default How do I set a macro in excel to save to a web site

have the macro do a saveas and give it a unique name.

--
Regards,
Tom Ogilvy


"Mary Thomas" wrote:

Hi there,
I have a macro which saves my workbook to a web site and send me an email
notification this is done. What I am going to need however is to have the
file name change each time it is saved to my location so it is not being
overwritten before I can pull the information.
Any ideas would be greatly appreciated.
Thanks,
Mary
--
MT

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default How do I set a macro in excel to save to a web site

Will that change the name each time a user opens the file and runs the macro?

I was thinking of adding a date or more than likely a number to the end of
the filename that would change (advance or count) each time the macro runs.
--
MT


"Tom Ogilvy" wrote:

have the macro do a saveas and give it a unique name.

--
Regards,
Tom Ogilvy


"Mary Thomas" wrote:

Hi there,
I have a macro which saves my workbook to a web site and send me an email
notification this is done. What I am going to need however is to have the
file name change each time it is saved to my location so it is not being
overwritten before I can pull the information.
Any ideas would be greatly appreciated.
Thanks,
Mary
--
MT

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default How do I set a macro in excel to save to a web site

If you follow your idea and give SAVEAS such a filename (with date (and time
if it is done within the same day)), then yes, it will be saved with the new
name.

--
Regards,
Tom Ogilvy


"Mary Thomas" wrote:

Will that change the name each time a user opens the file and runs the macro?

I was thinking of adding a date or more than likely a number to the end of
the filename that would change (advance or count) each time the macro runs.
--
MT


"Tom Ogilvy" wrote:

have the macro do a saveas and give it a unique name.

--
Regards,
Tom Ogilvy


"Mary Thomas" wrote:

Hi there,
I have a macro which saves my workbook to a web site and send me an email
notification this is done. What I am going to need however is to have the
file name change each time it is saved to my location so it is not being
overwritten before I can pull the information.
Any ideas would be greatly appreciated.
Thanks,
Mary
--
MT

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default How do I set a macro in excel to save to a web site

Ok, Thanks Tom, I thought that should work.
How do I format the date and time in the macro so that it changes each time?
Mary

--
MT


"Tom Ogilvy" wrote:

If you follow your idea and give SAVEAS such a filename (with date (and time
if it is done within the same day)), then yes, it will be saved with the new
name.

--
Regards,
Tom Ogilvy


"Mary Thomas" wrote:

Will that change the name each time a user opens the file and runs the macro?

I was thinking of adding a date or more than likely a number to the end of
the filename that would change (advance or count) each time the macro runs.
--
MT


"Tom Ogilvy" wrote:

have the macro do a saveas and give it a unique name.

--
Regards,
Tom Ogilvy


"Mary Thomas" wrote:

Hi there,
I have a macro which saves my workbook to a web site and send me an email
notification this is done. What I am going to need however is to have the
file name change each time it is saved to my location so it is not being
overwritten before I can pull the information.
Any ideas would be greatly appreciated.
Thanks,
Mary
--
MT



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default How do I set a macro in excel to save to a web site

Assume you will have a name like Mybook200607100830.xls (July 10, 2006,
8:30AM)



sName = thisworkbook.Name
sName = Left(sName,len(sName)-16)
sDate = format(Now,"yyyymmddhhmm")
Thisworkbook.SaveAs thisworkbook.Path & "\" & sname & sDate & ".xls"


just do demo some of the code from the immediate window:

sName = "Mybook200607100830.xls"
sname = Left(sname,len(sname) - 16)
? sname
Mybook
? sname & format(Now,"yyyymmddhhmm") & ".xls"
Mybook200607251444.xls


--
Regards,
Tom Ogilvy


"Mary Thomas" wrote:

Ok, Thanks Tom, I thought that should work.
How do I format the date and time in the macro so that it changes each time?
Mary

--
MT


"Tom Ogilvy" wrote:

If you follow your idea and give SAVEAS such a filename (with date (and time
if it is done within the same day)), then yes, it will be saved with the new
name.

--
Regards,
Tom Ogilvy


"Mary Thomas" wrote:

Will that change the name each time a user opens the file and runs the macro?

I was thinking of adding a date or more than likely a number to the end of
the filename that would change (advance or count) each time the macro runs.
--
MT


"Tom Ogilvy" wrote:

have the macro do a saveas and give it a unique name.

--
Regards,
Tom Ogilvy


"Mary Thomas" wrote:

Hi there,
I have a macro which saves my workbook to a web site and send me an email
notification this is done. What I am going to need however is to have the
file name change each time it is saved to my location so it is not being
overwritten before I can pull the information.
Any ideas would be greatly appreciated.
Thanks,
Mary
--
MT

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
Looking for Excel site similar to "The Word MVP Site" Doug New Users to Excel 1 January 25th 09 12:46 PM
Can a Macro open workbooks on a SharePoint Site? Randy Excel Discussion (Misc queries) 0 August 29th 06 07:21 PM
Access a internet Web Site uisng a macro done with excel [email protected] Excel Programming 1 April 1st 04 05:14 AM
Macro to go a WEB site and enter a password Bob Benjamin Excel Programming 7 November 14th 03 03:34 PM
Save to FTP site through a macro L Monetti Excel Programming 0 July 29th 03 03:17 PM


All times are GMT +1. The time now is 04:45 AM.

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"