LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Trying to increment by one day in a macro


Hello,
Having all sorts of fun getting this one worked out, to date, n
success at all
I basically one to have a form to collect the start date and nr of day
required then print the worksheet with the dates incrementing from th
start date by one for the number of days required.
This is what I have tried:

Private Sub cmdPrint_Click()
'Dim Variables
Dim D As Integer
Sheets("LogSheet").Select
Range("Date") = ""
'Transfer Info from frmDriverLogInfo
Sheets("LogSheet").Select
Range("Date") = txtStartDate.Value
D = cboNrOfDays.Value
'Print Selected Number of Days
For I = 1 To D
Sheets("LogSheet").Select
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
ActiveSheet.Range("Date").Value = ActiveSheet.Range("Date").Value
1
Next I
End Sub

Any help would be most appreciated.
Many thanks, Phi

--
Phil
-----------------------------------------------------------------------
PhilB's Profile: http://www.excelforum.com/member.php...fo&userid=1286
View this thread: http://www.excelforum.com/showthread.php?threadid=31897

 
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
Macro - How to increment cell reference by one row lau_ash[_2_] Excel Worksheet Functions 7 April 4th 23 02:17 PM
Using macro recorder increment cell by one? Student2 Excel Discussion (Misc queries) 4 March 26th 09 05:05 PM
copy cell with macro and increment down each time RJJ Excel Worksheet Functions 6 May 9th 08 06:16 PM
Macro to increment invoice number Paul Excel Programming 1 September 19th 03 08:58 PM
Macro to Increment a Cell's Value By 1 Dave[_25_] Excel Programming 2 August 10th 03 09:33 PM


All times are GMT +1. The time now is 12:21 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"