millhouse123
Active Member
- Joined
- Aug 22, 2006
- Messages
- 335
I use an endless variation of the formula below in excel and would now like to use a form of it in VBA but I am not sure about the right syntax.
=Date(Year(Variable),Month(Variable) -1,Day(Variable))
I tried
application.worksheetfuntion.Date(Year(variable),Month(Variable)-1,day(Variable)) but I could not get that to work.
Thank You[/code]
=Date(Year(Variable),Month(Variable) -1,Day(Variable))
I tried
application.worksheetfuntion.Date(Year(variable),Month(Variable)-1,day(Variable)) but I could not get that to work.
Thank You[/code]