millhouse123
Active Member
- Joined
- Aug 22, 2006
- Messages
- 334
I use an endless variety of of the function below and I would like to know the correct sytanx for writitng a similar formula in VBA.
=Date(Year(CellReference),Month(CellRefference)-1,Day(CellRefference))
I tried:
Application.worksheetfuntion.Date(Year(Variable),Month(Variable) -1,Day(Variable))
But got an error.
Thank you
=Date(Year(CellReference),Month(CellRefference)-1,Day(CellRefference))
I tried:
Application.worksheetfuntion.Date(Year(Variable),Month(Variable) -1,Day(Variable))
But got an error.
Thank you