VBA question

Hey guys, I'm either getting dumb or just too sleep deprived.
Isn't every Excel function available in VBA via Application.WorksheetFunction. ?
I thought so. I'm trying to use the Date(Year,Month,Day) function and it's not recognized.:confused:
 
I figured out a "round and about" way to get what I need, but still, curios if I was wrong in assuming all excel function could be used in VBA. I've used a whole bunch before and this is the first time I that I came across smth that's not working.
Thnx.
 
I think objects that refer to a range work in Application.WorksheetFunction , date doesn't use a range reference.
Even so I would use the Date command assigned to a variable then drop that to the worksheet... as it can be formatted in the module too :)
 
Quote from vladiator:

Hey guys, I'm either getting dumb or just too sleep deprived.
Isn't every Excel function available in VBA via Application.WorksheetFunction. ?
I thought so. I'm trying to use the Date(Year,Month,Day) function and it's not recognized.:confused:

Not all worksheet functions are available to VB .....Date is not included
 
Back
Top