I have some data that has dates (month and year) associated with it. I currently do the following: sort the dates and find the first date and the last date in the range. I now need to populate a list containing every month and year combination between those two dates. For instance, if the date range was Jan 2008 to Apr 2008, I need to create a list with: Jan, Feb, Mar, and Apr 2008.
In Excel, I use the Date function to add 1 to the month value of each date, which works great. I would like to use this function from my VBA code using somethling like the following:
The code above (I think) should populate Cell(1,6) with Jan-1-2008. My question is not about how to use the WorksheetFunction capability, rather how to use the "date" method from VBA code, since I get the following error: "Object doesn't support property or method" when I run the above code.Please Login or Register to view this content.
Bookmarks