Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 493
Default tomorrow's date

One way:

Replace

Now()

(which doesn't need the parentheses in VBA) with

Date + 1

In article ,
"stat" wrote:

I use the following code to write code to create a text file that eventually
becomes a batch file to run an automated process.
how can I specify tomorrow's date instead of today?

thanks again
Sub MakeMy_Code()
Dim Command
Sheets("Sheet1").Select
Call mk_symb
Sheets("Sheet2").Select
Call mk_symb
If Day(Now()) < 10 Then
Range("A1") = "0" & Day(Now())
Else
Range("A1") = Day(Now())
End If
If Month(Now()) < 10 Then
Range("A2") = "0" & Month(Now())
Else
Range("A2") = Month(Now())
End If
Sheets("Sheet1").Select
Range("A1") = "@echo off"
Range("a2") = "cls"
Range("a3") = "ren q:\Backupddmm.zip backup" & Range("'Sheet2'!A1") &
Range("'Sheet2'!a2") & ".zip"
Call Save
'tells Excel the workbook is saved then quits Excel
ActiveWorkbook.Saved = True

Application.Quit
End Sub

Sub mk_symb()
Cells.Select
Range("D7").Clear
Range("B6").Select
Columns("A:A").NumberFormat = "@"
Range("A1").Select
End Sub


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
Formula to return tomorrow's date. Shadyhosta New Users to Excel 6 April 4th 23 10:20 AM
date in Cell to change colors if the date is beyond today's date Pete Elbert Excel Discussion (Misc queries) 2 June 6th 09 06:31 AM
tomorrow's date on an invoice made today carlos New Users to Excel 2 October 27th 08 07:19 AM
Report Date - Date Recv = Days Late, but how to rid completed date MS Questionnairess Excel Worksheet Functions 1 January 24th 07 11:05 PM
Date updates from worksheet to chart & changes date to a date series! Help!! Jayjg Charts and Charting in Excel 2 January 22nd 05 03:00 PM


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