Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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 |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hi,
You don't need to use the Day() worksheetfunction because VB has its own day() function. MyDay = Day(MyDate) Mike "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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Problem with macro | Excel Discussion (Misc queries) | |||
Macro Problem | Excel Worksheet Functions | |||
Macro problem | Excel Discussion (Misc queries) | |||
macro problem | Excel Discussion (Misc queries) | |||
macro problem | Excel Discussion (Misc queries) |