0

I developed an Excel application to work out staff absences.
I created a userform (calendar) that works as a date picker to specify a date in the cell (“I32”).

To make that work at home, I downloaded the MSCOMCT2.OCX and paste that OCX in system32 to register.

At the office the userform does not work as the office does not have the option of Microsoft MonthView control.
I tried to copy the MSCOMCT2.OCX for registering. The system does not allow me to do so without the administrator password.

How can I bypass the MSCOMCT2.OCX?

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
     
    If Not Intersect(Target, Range("I2")) Is Nothing Then Calendar.Show
     
    If Target.Column = 3 Or Target.Column = 4 Or Target.Column = 5 Or Target.Column = 6 Or Target.Column = 7 Then
        If Target.Row = 14 Or Target.Row = 24 Or Target.Row = 34 Or Target.Row = 44 Then
            Beep
            Cells(Target.Row, Target.Column).Offset(0, 1).Select
        End If
     End If
    
End Sub
Community
  • 1
  • 1
Rocky
  • 19
  • 7

1 Answers1

0

Hate it when you don't have Administrative rights. I'm guessing 3rd party controls are out of the question as well as they would have to be "installed", "registered", etc...

One work around that will take a bit of coding is to create your own calendar control using forms and vba. You can use buttons or labels for the click actions.

If Not Intersect(Target, Range("I2")) Is Nothing Then MyCalendarForm.Show

Otherwise, you'll have to buy the "administrator" a cup of coffee....

HTH

dslice
  • 26
  • 4