Macro
The macro would drop dates in column A so fast you would be full before you ever
typed your XXX
How about two inputboxes?
One for the date and one for the number of dates down column A
Private Sub Workbook_Open()
Dim rng As Range
Dim I As Integer
Dim vDate As Date
Dim numtimes As Integer
With Sheets("Sheet1")
vDate = InputBox("Please type in a date")
numtimes = InputBox("How far to increment? Enter a number")
Set rng = Range("A1")
rng.Value = vDate
For I = 1 To numtimes Step 1
rng.Offset(I, 0).Value = rng.Offset(I - 1, 0).Value + 1
Next I
End With
End Sub
Gord Dibben MS Excel MVP
On Mon, 10 Mar 2008 12:18:00 -0700, Cedric
wrote:
I recently found the macro listed below. If I wanted the macro to run until
I enter XXX how would I go about that. I would want a line between each date.
Option Explicit
Private Sub Workbook_Open()
Dim vDate As String
vDate = InputBox("Please type in a date")
Worksheets("Sheet1").Range("A1") = vDate
End Sub
Thanks in advance
|