Calendar Control - closing out

  • Thread starter Thread starter michael.haight
  • Start date Start date
M

michael.haight

Hi - I'm a newbie with VB programming, so this may be a simple
solution which I'm just missing, but....

I'm using the Calendar Control version 11 within my spreadsheet to
allow a user to select a date for a specific cell. I have set up the
form to become visible once a button is clicked.

Afterwards, I'm trying to put code inside the AfterUpdate() sub which
will close the Calendar Control (or at least make it not visible). My
code is ery simple:

Private Sub frmCalendarBox_AfterUpdate()
frmCalendarBox.Visible = False
End Sub

The bad news is that this isn't working. Any thoughts???

PS - I also tried to trigger the close based on the value in my taget
cell (F6) being changed. For this I used the following code:

Private Sub Worksheet_Change(ByVal Target As Range)
If Range("F6").Value > 1 / 1 / 2006 Then
frmCalendarBox.Visible = False
End If
End Sub

But no luck with that, either.

Any help someone could give would be appreciated!!!

Thanks,

-Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top