Thread: Macro
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
mustngsalie mustngsalie is offline
external usenet poster
 
Posts: 9
Default Macro

Thank you so much for your response. I need a little more clarification, as
the only training I have had is self taught. I have set it up to ask the
questions in a message box, which is what I need, but how do I get the data
entered to relate to the users response? Below is what I have written so
far...The first message box asks the user to enter the column and row where
they would like the data stored, How do I get the answer to the next message
box (Beginning date) into their previously entered column and row.

Sub dateincrement()
'Date Increment macro
Dim begdate As String
Dim daysapart As String
Dim numtimestorepeat As String
Dim columntoinputdates As String

columntoinputdates = InputBox("Enter the column and start row to store
dates.")
begdate = InputBox("Enter the Beginning Date.")
daysapart = InputBox("Enter increments between dates.")
numbertimestorepeat = InputBox("Enter the number of times to repeat each
date.")



End Sub


"JMay" wrote:

You need to write a Looping macro:
Your variables a

BegDate 6/2/2007
DaysApart 6
NumTimesToRepeat 2

Give it a try and write back if you encounter problems.




"mustngsalie" wrote:

Hello....I want to enter a start date and an end date, and after entering
this information, increment the dates by a specified amount, (example below
shows, 7 days) onto the start date and record each day a specified amount of
times, (example below shows 2), then paste into a specified column. I am of
course new at VBAs and macros, and would appreciate any help. Below is a
copy of what we would do.
2-Jun-07
2-Jun-07
8-Jun-07
8-Jun-07
14-Jun-07
14-Jun-07
20-Jun-07
20-Jun-07
26-Jun-07
26-Jun-07
2-Jul-07
2-Jul-07
8-Jul-07
8-Jul-07
14-Jul-07
14-Jul-07
20-Jul-07
20-Jul-07
26-Jul-07
26-Jul-07
1-Aug-07
1-Aug-07
7-Aug-07
7-Aug-07
13-Aug-07
13-Aug-07
19-Aug-07
19-Aug-07
25-Aug-07
25-Aug-07
31-Aug-07
31-Aug-07
6-Sep-07
6-Sep-07
12-Sep-07
12-Sep-07