+ Reply to Thread
Results 1 to 14 of 14

Show Calendar When Cell is Selected

  1. #1
    Registered User
    Join Date
    02-11-2009
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    93

    Show Calendar When Cell is Selected

    Could someone please help me modify my code to have the calendar appear when the cell is selected?

    Right now, you have to double click before the calendar appears. Specifically, I would like the calander to appear only when cell "C1" is selected.

    Thanks!!!
    Attached Files Attached Files
    Last edited by siamadu; 02-26-2009 at 02:13 PM.

  2. #2
    Forum Expert
    Join Date
    08-27-2008
    Location
    England
    MS-Off Ver
    2010
    Posts
    2,561

    Re: Show Calendar When Cell is Selected

    instead of beforedoubleclick you want selectionchange and you want to specify the target to be C1

    CC

  3. #3
    Registered User
    Join Date
    02-11-2009
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    93

    Re: Show Calendar When Cell is Selected

    Thanks Charlie,

    I am pretty new at the whole programming in VBA. So please forgive me for my ignorance. I am the changes in the code but I am getting an error message:

    Compile error: Procedure declaration does not match description of event or procedure having the same name
    Last edited by siamadu; 02-24-2009 at 01:15 PM.

  4. #4
    Registered User
    Join Date
    02-11-2009
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    93

    Re: Show Calendar When Cell is Selected

    Charlie,

    I played with the code and figured out what was wrong with it. I needed to delete
    Please Login or Register  to view this content.
    Now there seems to another problem. When I detailed the above code, the calendar works but it causing problems with the cancel button. The Boolean is set to true.

    It is a way that I can have it close with the red exit button the userform and with the Cancel button?
    Last edited by siamadu; 02-24-2009 at 01:14 PM.

  5. #5
    Forum Expert
    Join Date
    08-27-2008
    Location
    England
    MS-Off Ver
    2010
    Posts
    2,561

    Re: Show Calendar When Cell is Selected

    Here,
    Please Login or Register  to view this content.
    HTH
    (I didn't actually open the workbook before)

  6. #6
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Show Calendar When Cell is Selected

    One problem to be aware of when using clendar controls is that the control may not be available on all machines. Take a look at the alternative here
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  7. #7
    Registered User
    Join Date
    02-11-2009
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    93

    Re: Show Calendar When Cell is Selected

    Thanks for the insite. i will take a look into in a few mintues.

  8. #8
    Forum Expert
    Join Date
    08-27-2008
    Location
    England
    MS-Off Ver
    2010
    Posts
    2,561

    Re: Show Calendar When Cell is Selected

    Please mark this thread as solved (assuming it is)

  9. #9
    Registered User
    Join Date
    02-11-2009
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    93

    Re: Show Calendar When Cell is Selected

    It is not quite solved yet. The calander does appear when I select the cell. However, when I close the calander with the exit button, it returns an error.

    Can you please provide revise the code to have the calander close with the "Cancel" button and the exit button on the form?

  10. #10
    Forum Contributor unley's Avatar
    Join Date
    11-27-2008
    Location
    South Australia
    MS-Off Ver
    MS Office 2007
    Posts
    253

    Re: Show Calendar When Cell is Selected

    Cheeky Charlie's code seem to work with me. Maybe you have to check the codes

  11. #11
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Show Calendar When Cell is Selected

    This is causing the error
    Please Login or Register  to view this content.

    What's fmC.GetChoice?

  12. #12
    Registered User
    Join Date
    02-11-2009
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    93

    Re: Show Calendar When Cell is Selected

    hi RoyUK,

    I am a VBA novice. This code was taking from a VBA Excel Book. I used the example and copied it to my spreadsheet. So i have no idea why the programmer used
    Please Login or Register  to view this content.
    Is there anyway to modify my existing code it to close with the exit button as while as the cancel button?

  13. #13
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Show Calendar When Cell is Selected

    The code seems over complicated. Try this
    Attached Files Attached Files

  14. #14
    Registered User
    Join Date
    02-11-2009
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    93

    Re: Show Calendar When Cell is Selected

    Thanks so much RoyUK. You saved the day once again!!!

    It worked perfectly. I hope you will be able to solve my next challenge.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1