View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
jaf jaf is offline
external usenet poster
 
Posts: 300
Default marco variables or substitution

To add a note. Don't use Date. It's a VBA reserve word.
a=date 'today

--

John

johnf202 at hotmail dot com


"Tim Gwynn" wrote in message
...
I have a macro that references a month in a file name - it
is in multiple locations in the macro and I want to add an
entry at the beginning of the macro that allows for the
month number to substitute throughout the macro. I know
how to do this in SAS but I have not been able to find a
way to do it in Visual Basic.

For example

Date = 12

filename "date_03_analysis" so everywhere the date is
referenced it would substitute 12 instead of the word date.

Thank you.