ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   marco variables or substitution (https://www.excelbanter.com/excel-programming/272067-re-marco-variables-substitution.html)

jaf

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.





All times are GMT +1. The time now is 08:08 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com