• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

color matched day in calendar

Afarag

Member
Dears,

I have a calender published from this awesome site I use in other path to calculate working day, in other sheet i inserted Vacation days, i ask to every inserted day in this list, its calendar cell will be in red color to specialize them.
this list in "SYSUSE" sheet and it in range (A2:A30)
i ask also if "Calender" sheet will be disabled ribbon, and i added option button to enable it but need if will be protected with password, when click to enable an user form popup to insert password that eg: 123, and if available if can i lock every month's table cells in calendar to avoid tampering


Thanks a lot
 

Attachments

  • 2014-calendar.xlsm
    80.8 KB · Views: 5
@Audi,

Thanks a lot for your great support.

what a bout of disable ribbon pars, i checked before from http://www.rondebruin.nl
and get this code but it's not applied to hide ribbon pars
Code:
Dim Rib As IRibbonUI
Dim MyTag As String

'Callback for customUI.onLoad
Sub RibbonOnLoad(ribbon As IRibbonUI)
    Set Rib = ribbon
End Sub

Sub GetVisible(control As IRibbonControl, ByRef visible)
    If control.Tag Like MyTag Then
        visible = True
    Else
        visible = False
    End If
End Sub

Sub RefreshRibbon(Tag As String)
    MyTag = Tag
    If Rib Is Nothing Then
        MsgBox "Error, restart your workbook"
    Else
        Rib.Invalidate
    End If
End Sub

'Note: Do not change the code above


'***********************************************
'Examples to show a different tab(s) on the Ribbon for each worksheet.
'See the Workbook_SheetActivate event in the Thisworkbook module.
'***********************************************
 
I did not understood your second requirement. You want to disable ribbon, and when a user select a option box the ribbon should appear only after entering password. Is this correct?

Regards,
 
Sorry @Somendra Misra
regardless of the second request, i can overlook it, but i face an error at worksheet calculation, this sheet let me determine the last working day for a period i filled it in the colored cell above for each month calender
in steps:
insert the period eg: 15, then hit the button called "Find End Date" to color the cell for the last working day.
working day: all the days except of Fri, Sat and the vacation day inserted in vacation list.

I face a miscalculation that when the end date for the filled period is the month last day, the true end date isn't selected.

this issue isn't global for every month

eg: in Feb: if Insert WD # "5", then select the day "19" and hit "Find End Date"
the true last end date will not defined, also if Insert WD # "6" and the day "18"

also the same case in may, jun, Aug, Oct and Nov months

please you can take a look for the applied VBA to find the problem

Thanks,
 
@Afarag

I did not understood. If I entered 1 in WD cell for March and selected 30-Mar-2014, 31 - Mar - 2014 got highlighted. What is wrong?

Regards,
 
@Somendra Misra ,

actually this problem isn't founded at all the months. after more than one try, i found this wrong calculation in Feb,may, jun, Aug, Oct and Nov months
 
Back
Top