Macro
Option Explicit
Private Sub Workbook_Open()
Dim vDate As String
Dim DestCell As Range
Set DestCell = Worksheets("Sheet1").Range("A1")
Do
vDate = InputBox("Please type in a date")
If LCase(vDate) = LCase("xxx") Then
Exit Do
Else
DestCell = vDate
Set DestCell = DestCell.Offset(2, 0)
End If
Loop
End Sub
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
--
Dave Peterson
|