Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 03-23-2014, 06:59 AM
lingering lingering is offline save a file with a predetermined date in VBA Windows 8 save a file with a predetermined date in VBA Office 2013
Novice
save a file with a predetermined date in VBA
 
Join Date: Mar 2014
Posts: 1
lingering is on a distinguished road
Default save a file with a predetermined date in VBA


Y'ello. I want to create a macro that will save a document with a predetermined day of the week (always the next Saturday) in the title, e.g.

If I were to save the file today the macro would call the document "2013-03-29 Expense Reimbursement"

I know, and thank, MACROPOD for the calculated date formula that accomplishes this in a form field, but I want to do it in VBA for a Macro button.

The "only" piece I'm missing is the bit that would generate the date (I know how to choose a file location and add "Expense Reimbursement" to the title).
Reply With Quote
  #2  
Old 03-23-2014, 07:47 PM
macropod's Avatar
macropod macropod is offline save a file with a predetermined date in VBA Windows 7 32bit save a file with a predetermined date in VBA Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Try something based on:
Code:
Sub Demo()
Dim StrDate As String
StrDate = Format(Int(Date / 7 + 1) * 7, "YYYY MM DD")
MsgBox StrDate
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
save a file with a predetermined date in VBA error: You are attempting to save a file format that is blocked by file block setting zatlas1 Office 8 04-28-2012 02:37 PM
save a file with a predetermined date in VBA Insert date when save file gg80 Excel Programming 3 01-29-2011 08:36 AM
save a file with a predetermined date in VBA How to update automatically the “file name” as we do for the “Date”? Jamal NUMAN Word 2 01-06-2011 02:43 PM
save a file with a predetermined date in VBA Word Macro: Save file as text with current file name jabberwocky12 Word VBA 2 10-22-2010 12:23 PM
How to save file on CD? DennisWG Word 0 09-07-2010 10:41 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 08:50 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft