I think it was an excellent compromise... easy to understand, easy to use.
Printable View
Checked again and it still operates the way I posted. Here is how I make it happen. Select October and then click the 31 button (this enters the date into the active cell), next click the down arrow for the month drop-down and select February from the list... March display with day 2 selected**... click any (valid) day button and the month name changes to February with the clicked day selected.
** I just noticed something that may help in tracking down the problem. For the year 2012, March 2nd was selected, but for a non-leap year, March 3rd is selected instead. It is as though your calculation method is to go to the last day of the month and subtract the new month's last day number from it... that seems to be the way the day is being generated for me... don't have any idea about the month that is being select though. When I get some free time, I will try examining your code for myself to see if I can spot what is happening.
Oh, I forget to mention... I am using XL2007 (SP2) if that might end of mattering.
Tried again. It's always selecting the 1st day. I guess it's the SP2. I'll try on another machine (probably at work) and get back to you on this one.
Great work Excel Fox !!
It works fine on 2010.
Do you have the Xml as well??
Looks great!!
Robert
The XML is posted in the original post Robert
Thank you for your reply,
Did i miss the call bacl functions, ???
Regards,
Robert
Alt F11,...
2 minor things,
first your screentip for year, gives also month instead of year,
two: btnWeedDay should be btnWeekDay i guessed,...,
which is not so important, because you used it through your whole application,
because, just to let you know,...
(changed the year myself, because 35 years ahead, and back, where just a little bit to much for me...),
Only thing overhere is that the day highlighted is wednesday, although it tuesday here,...
try to figure it out in your code,
windows settings??
Timedifference,???
Regards,
Robert
'Callback for btnWeedDay1 getLabel
Sub WeekDayLabel(control As IRibbonControl, ByRef returnedVal)
'Stop
returnedVal = Left(WeekdayName(Weekday(DateSerial(Year(dtmDate), Month(dtmDate), Val(Right(control.ID, 2))))), 2)
returnedVal = Left(WeekdayName(Weekday(DateSerial(Year(dtmDate), Month(dtmDate), Val(Right(control.ID, 2))), vbUseSystemDayOfWeek)), 2)
End Sub
changing in system day of weeks will do the trick!
(was now on vbSunday),
Thank you for your co-operation and application,!!!
Regards,
Robert