Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
sam76210
 
Posts: n/a
Default Save Excel File every wednesday VB Script Help !!


Hello Group,
I use the following code to save file as an html at the end of month
with Date stamp.

Sub chem_gas_7day()
Dim newSecond
Dim fname As String

fname = Format(Date, "yyyy-mm")


Sheets("data").Select

If CDate(Format(Range("A2").Value, "mm/dd/yyyy")) =
CDate(DateSerial(Year(Now), Month(Now) + 1, 0)) Then


ActiveWorkbook.Save

ChDir "C:\TEST\"
ActiveWorkbook.SaveAs Filename:="C:\TEST\" & fname & "_Report"
& ".html", FileFormat:=xlHtml, _
ReadOnlyRecommended:=False, CreateBackup:=False


Else

Sheets("Report").Select
Range("A1").Select

ActiveWorkbook.Save

ChDir "C:\TEST\"
ActiveWorkbook.SaveAs Filename:="C:\TEST\Report.html",
FileFormat:=xlHtml, _
ReadOnlyRecommended:=False, CreateBackup:=False



End If

End Sub


I wonder if i can save file now every Wednesday with Date stamp (file
name = wednesday date). In other words saving file every 7th day.
Thanks in adavnce for help.
Sam


--
sam76210
------------------------------------------------------------------------
sam76210's Profile: http://www.excelforum.com/member.php...o&userid=20885
View this thread: http://www.excelforum.com/showthread...hreadid=520145

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
TRYING TO SET UP EXCEL SPREADSHEET ON MY COMPUTER MEGTOM New Users to Excel 5 October 27th 05 03:06 AM
Excel 2000 cannot save and create temp file GK Setting up and Configuration of Excel 1 October 25th 05 10:33 PM
Excel XP: File name in Title Bar not changed after Save As... Dominic Excel Discussion (Misc queries) 9 August 1st 05 12:58 PM
VBA for Excel 2000 file is corrupt nkamp Excel Discussion (Misc queries) 0 May 26th 05 03:37 PM
How save a lotus 2.2 file in excel and to open it in excel and pe. bird New Users to Excel 0 February 26th 05 02:57 AM


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