I have the following variable in my Macro:
todaydate = Year(Date) + Month(Date) + Day(Date)
How do I make the value of todayDate to be 20150415 instead of 2034?
To concatenate it as string, you need to use &.
Like this:
todaydate = Year(Date) & Month(Date) & Day(Date)
But this will yield: 2015415
To get what you want, try this:
todaydate = Format(Date, "yyyymmdd")
which will yield: 20150415