View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Problem using Day() in a macro

Because VBA has its own Day() function.

intlastday = day(mydate)



Marie wrote:

I am trying to use the Day() function in a macro using a line like this

intLastDay = Application.WorksheetFunction.Day(date as a serial)

But VBA does not seem to recognize Day() as a worksheetFunction
Anybody has an idea why?

PS I am using Excel 2007
--
Marie


--

Dave Peterson