making monthview control visible only when cell is clicked

C

Colin Raven

Hi all!!
I just discovered the MonthView control for selecting a date, it looks _so_
useful, and was well worth the search.
B.U.T. (there's always a "but"!)

How can I make the control visible only when a user clicks into that
particular cell?? (In other words a "drop down" ??)

I searched the control properties, played with almost every single relevant
sounding value but couldn't find what to change in order to enable only
"on-click" visibility. Not having any VBA knowledge doesn't help either I
guess.

Here's what I did so far, perhaps someone can take a look and see what I'm
either doing wrong, or else failing to do at all.

1. Choose a cell where the desired "drop down calender" will reside
2. View | Toolbars |Visual Basic | Control Toolbox | More Controls
3. Choose "Microsoft MonthView Control 6.0 (SP4)"
4. Plant it in the chosen cell described in 1. above, size accordingly
5. [???????] [??????] to make it "OnClick visible"

Some reading brought me to an article which seemed to suggest that I should
*first* insert a text box in the cell (prior to inserting the control
apparently), but that didn't change the outcome.

Guidance, suggestions and opinions would all be greatly appreciated.

Regards to all & TIA,
-Colin
 
A

Andy Brown

I just discovered the MonthView control for selecting a date, it looks
_so_
useful ...

Possibly something in the worksheet module (rightclick the sheet tab, View
Code), like

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address = "$B$2" Then
MonthView1.Visible = True
Else
MonthView1.Visible = False
End If
End Sub

HTH,
Andy
 
F

Frederick A. W. Pasternack

Andy Brown said:
Possibly something in the worksheet module (rightclick the sheet tab, View
Code), like

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address = "$B$2" Then
MonthView1.Visible = True
Else
MonthView1.Visible = False
End If
End Sub
Unfortunately this doesn't seem to affect anything. (-:
I tried it as shown, (it seems to be the only code in the worksheet module
as of now BTW)
and upon closing code view and returning to the worksheet, all is as it was,
nothing has changed.
Thank you for the suggestion!!!!! I am grateful for any offers of help
and/or guidance.
Regards,
-Colin
 
C

Colin Raven

Andy Brown said:
So you're saying it's fixed now?

No, sorry...that was an ambiguous answer...my apologies.
The answer to your question "are you in design mode" was "yes indeed"
It isn't fixed by any means, the control still exhibits the same behavior as
previously
-Colin
 
A

Andy Brown

No, sorry...that was an ambiguous answer...my apologies.
The answer to your question "are you in design mode" was "yes indeed"
It isn't fixed by any means, the control still exhibits the same behavior as
previously

The first tool in Control Toolbox is Design Mode. If it's sunken, you're in
Design Mode. Click on it to Exit Design Mode, as per the ToolTip.

Rgds,
Andy
 
C

Colin Raven

Andy Brown said:
behavior

The first tool in Control Toolbox is Design Mode. If it's sunken, you're in
Design Mode. Click on it to Exit Design Mode, as per the ToolTip.

It worked!!!!! (A huge "DUH" for me there)
I failed to exit design mode as you had speculated.

Odd though that now it behaves as desired, it doesn't write the selected
date to the cell
 
C

Colin J. Raven

Colin Raven said:
It worked!!!!! (A huge "DUH" for me there)
I failed to exit design mode as you had speculated.

Odd though that now it behaves as desired, it doesn't write the selected
date to the cell

Playing with properties fixed that issue.
I *think* it was the linked cell property that solved it. Now the date is
displayed.

Thanks and Kudos to Andy Brown for solving this and also for extreme
patience!!!!!!
 

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

Top