+ Reply to Thread
Results 1 to 7 of 7

Popup of DTPicker when clicking cells A2:A500

  1. #1
    Registered User
    Join Date
    01-24-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007
    Posts
    2

    Exclamation Popup of DTPicker when clicking cells A2:A500

    Hey all,

    I'm having difficulty with this code. Know that I am a complete novice.

    Initially, I used a simple tutorial I found online that utilized the "Calendar" control from VBA, not the Date & Time Picker. That tutorial was very easy, however, I had to install the OCX file manually on my computer for the Calendar control to work properly. However, when sharing the file to multiple users of it, what I had not anticipated was that all users would have to install the file individually. This is a problem.

    Instead, I thought I would replace the "Calendar" tool with the "Date & Time Picker" tool, however, I am getting several errors when I run it. What I really need is the following:
    • When the active cell is selected (cells A2:A500 (or even infinity, really)), the Date & Time Picker pops up for the user to select the date
    • Once the date is selected, and the user hits OK, the information is entered into the selected cell
    • Should the user hit the ESC key, the popup closes
    • If a date is already entered, the popup defaults to the date entered in the cell - not the current date

    There is so much code here, that I simply am lost.

    Userform1 Code (there is two command buttons, one is the OK command button, the other is a hidden button allowing the use of the ESC key:

    Please Login or Register  to view this content.
    Sheet1 Code (I think this is where the issue lies):

    Please Login or Register  to view this content.
    Module1 Code (another problem I'm sure):

    Please Login or Register  to view this content.

    Any help is GREATLY appreciated. Thanks for any help you can provide!!
    Attached Files Attached Files
    Last edited by kamblan04; 01-24-2011 at 12:13 PM.

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

    Re: Popup of DTPicker when clicking cells A2:A500

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code. Posting code without them makes your code hard to read and difficult to be copied for testing. Highlight your code and click the # at the top of your post window. For more information about these and other tags, found here
    Hope that helps.

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

    Free DataBaseForm example

  3. #3
    Valued Forum Contributor jwright650's Avatar
    Join Date
    12-10-2010
    Location
    Va, USA
    MS-Off Ver
    Excel 2003, Excel 2010
    Posts
    606

    Re: Popup of DTPicker when clicking cells A2:A500

    Fixed a couple of named items and it works fine.....
    Attached Files Attached Files
    Life is like a roll of toilet paper. The closer it gets to the end, the faster it goes.
    John Wright

  4. #4
    Valued Forum Contributor jwright650's Avatar
    Join Date
    12-10-2010
    Location
    Va, USA
    MS-Off Ver
    Excel 2003, Excel 2010
    Posts
    606

    Re: Popup of DTPicker when clicking cells A2:A500

    Below is the revised code:

    Quote Originally Posted by kamblan04 View Post
    Please Login or Register  to view this content.
    Sheet1 Code (I think this is where the issue lies):

    Please Login or Register  to view this content.
    Module1 Code (another problem I'm sure):

    Please Login or Register  to view this content.

    Any help is GREATLY appreciated. Thanks for any help you can provide!!

  5. #5
    Registered User
    Join Date
    01-24-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Popup of DTPicker when clicking cells A2:A500

    Thanks so much!!

  6. #6
    Valued Forum Contributor jwright650's Avatar
    Join Date
    12-10-2010
    Location
    Va, USA
    MS-Off Ver
    Excel 2003, Excel 2010
    Posts
    606

    Re: Popup of DTPicker when clicking cells A2:A500

    Quote Originally Posted by kamblan04 View Post
    Thanks so much!!
    You're welcome, I like it when they are easy things to fix....LOL
    The name of the macro didn't match when you were trying to Call it and neither did the name of the UserForm with the DT Picker on it when you wanted to .Show it.

  7. #7
    Valued Forum Contributor jwright650's Avatar
    Join Date
    12-10-2010
    Location
    Va, USA
    MS-Off Ver
    Excel 2003, Excel 2010
    Posts
    606

    Re: Popup of DTPicker when clicking cells A2:A500

    If the problem is solved to your satisfaction, don't forget to edit your 1st post in this thread as "solved"

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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