S
slickdock
I have a sub that adds 1, 2 and 3 weeks to a user inputted date. I
want to call this routine from several other subs. How can I make the
original sub see the calls?
Sub Original()
Call DateCalc()
'Macro now finds location and needs to plug in 2 week follow up
letter date:
Selection.InsertBefore Ltr2wkDate
End Sub
Sub DateCalc()
Dim LtrDate As Date
LtrDate = inputbox("Desired letter date (TYPE NUMERICALLY, LIKE M/D/
YY:")
Dim Ltr0Date As String
Ltr0Date = Format(LtrDate, "mmmm d, YYYY")
Dim Ltr1wkDate As String
Ltr1wkDate = Format(DateAdd("ww", 1, Ltr0Date), "mmmm d, YYYY")
Dim Ltr2wkDate As String
Ltr2wkDate = Format(DateAdd("ww", 2, Ltr0Date), "mmmm d, YYYY")
End Sub
Thanks in advance.
want to call this routine from several other subs. How can I make the
original sub see the calls?
Sub Original()
Call DateCalc()
'Macro now finds location and needs to plug in 2 week follow up
letter date:
Selection.InsertBefore Ltr2wkDate
End Sub
Sub DateCalc()
Dim LtrDate As Date
LtrDate = inputbox("Desired letter date (TYPE NUMERICALLY, LIKE M/D/
YY:")
Dim Ltr0Date As String
Ltr0Date = Format(LtrDate, "mmmm d, YYYY")
Dim Ltr1wkDate As String
Ltr1wkDate = Format(DateAdd("ww", 1, Ltr0Date), "mmmm d, YYYY")
Dim Ltr2wkDate As String
Ltr2wkDate = Format(DateAdd("ww", 2, Ltr0Date), "mmmm d, YYYY")
End Sub
Thanks in advance.