lukeshuttlewood
Board Regular
- Joined
- Jul 27, 2004
- Messages
- 90
Hi,
Using the TODAY() function in an Excel spreadsheet cell at this moment in time would return something like 09/Nov/2005.
I want to know if it is possible to use excel functions in VBA without ever applying anything to the spreadsheet itself to get the return product.
I have tried this (below) in VBA.......I realy want to get just the 2 characters from the right of the product which would be = 05..............If it worked anyway!!!
ThisYear = Right("" & Application.WorksheetFunction.TODAY() & "", 2)
Does anyone know the syntax for this?
Using the TODAY() function in an Excel spreadsheet cell at this moment in time would return something like 09/Nov/2005.
I want to know if it is possible to use excel functions in VBA without ever applying anything to the spreadsheet itself to get the return product.
I have tried this (below) in VBA.......I realy want to get just the 2 characters from the right of the product which would be = 05..............If it worked anyway!!!
ThisYear = Right("" & Application.WorksheetFunction.TODAY() & "", 2)
Does anyone know the syntax for this?