Function VAriable passed to an Excel macro

S

Scott A. Will

I want to past the StartDate VAriabl;e to an excel Macro
can this be done

Here is my function
Public Function StartDate()

Dim stdte
Dim MyDate, mmonth, mday, myear, StDate

stdte = [Forms]![Input Form]!StartDate

MyDate = stdte ' MyDate contains the current system
date.
mmonth = Mid(MyDate, 1, 2)
mday = Mid(MyDate, 4, 2)
myear = Mid(MyDate, 7, 2)
StDate = "1" + myear + mmonth + mday

StartDate = StDate

End Function


I want to pass the variable StartDate to an Excel Macro

Can this be done?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top