Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Calendar Control - closing out

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Calendar Control - closing out

See my code page Mike
http://www.rondebruin.nl/calendar.htm

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


wrote in message ups.com...
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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Calendar Control - closing out

On May 15, 11:54 am, "Ron de Bruin" wrote:
See my code page Mikehttp://www.rondebruin.nl/calendar.htm

--

Regards Ron de Bruinhttp://www.rondebruin.nl/tips.htm



wrote in oglegroups.com...
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- Hide quoted text -


- Show quoted text -



Thanks Ron!! It wasn't exactly what I was looking for (hoping to have
the control close after a date is selected - without the user needing
to click outside the Calendar), but it's close enough and I'm happy
with it. Thanks again!

-Mike

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Calendar control Oldjay Excel Programming 1 October 28th 06 06:45 PM
How do I keep Calendar Control from closing? Roy Ringrose Excel Programming 6 February 1st 06 04:06 AM
Control disappeared problem - specifically, the Calendar Control JMMach[_2_] Excel Programming 0 December 16th 05 01:53 AM
Closing form turns off commandbar control procedures?? Caro-Kann Defence Excel Programming 0 January 28th 05 09:35 PM
Calendar Control: Can't exit design mode because control can't be created Rone Excel Programming 0 May 24th 04 04:01 PM


All times are GMT +1. The time now is 07:18 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"