+ Reply to Thread
Results 1 to 9 of 9

Using Datepicker in Userform VBA compatible to Excel 2013 64bit and 2007 32bit

  1. #1
    Registered User
    Join Date
    08-18-2012
    Location
    Malaysia
    MS-Off Ver
    Excel 2013
    Posts
    18

    Using Datepicker in Userform VBA compatible to Excel 2013 64bit and 2007 32bit

    Hi everyone,

    I need to create a userform activity record by date.xlsm where i want to change the textbox1 into datepicker so that I don't have to type it incoherently.

    Furthermore, the file is intended compatible with two versions of Microsoft Office Excel to work with, namely 2013 version with 64-bit and 2007 version with 32-bit.

    I have been trying to change the textbox1 into datepicker for weeks already as I am unable to find solution.

    Appreciate for helping me on this one.

    Thanks.
    Last edited by ashburnadam; 07-23-2015 at 08:57 PM. Reason: Problem's Solved

  2. #2
    Forum Expert JasperD's Avatar
    Join Date
    05-07-2013
    Location
    Netherlands
    MS-Off Ver
    Excel 2016
    Posts
    1,393

    Re: Using Datepicker in Userform VBA compatible to Excel 2013 64bit and 2007 32bit

    Try attached.
    activity record by date.xlsm
    Please click the * below if this helps

  3. #3
    Forum Guru
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,860

    Re: Using Datepicker in Userform VBA compatible to Excel 2013 64bit and 2007 32bit

    Hi ashburnadam,

    Bad news and Good News.

    Bad: DatePicker is not compatible with 64 bit Excel.

    Good: There are alternatives. See post #13 and #16 in the following thread for links to free 100% VBA alternatives:
    http://www.excelforum.com/excel-prog...r-control.html

    Lewis

  4. #4
    Forum Expert JasperD's Avatar
    Join Date
    05-07-2013
    Location
    Netherlands
    MS-Off Ver
    Excel 2016
    Posts
    1,393

    Re: Using Datepicker in Userform VBA compatible to Excel 2013 64bit and 2007 32bit

    @Lewis - you're right, that's why I use a decent alternative that is rather flexible.
    I don't get why there's no default datepicker control in excel that is a) compatible with multiple excel versions and b) portable...
    Anyway, check out my attached file, that seems to work fine

  5. #5
    Registered User
    Join Date
    08-18-2012
    Location
    Malaysia
    MS-Off Ver
    Excel 2013
    Posts
    18

    Re: Using Datepicker in Userform VBA compatible to Excel 2013 64bit and 2007 32bit

    Hi JasperD, I am referring to the attached file. It did work in my PC (Office 2013 Student Edition 64-bit) but not with my laptop (Office 2013 Professional Edition 64-bit). I haven't try it in 2007 32-bit pc yet.

    It says "compile error: the code in this project must be updated for use on 64-bit systems. Please review and update Declare statements and then mark them with PtrSafe attribute."

    Thanks for your effort.
    Last edited by ashburnadam; 07-20-2015 at 08:13 AM. Reason: For clarity purpose

  6. #6
    Registered User
    Join Date
    08-18-2012
    Location
    Malaysia
    MS-Off Ver
    Excel 2013
    Posts
    18

    Re: Using Datepicker in Userform VBA compatible to Excel 2013 64bit and 2007 32bit

    Quote Originally Posted by JasperD View Post
    Try attached.
    Attachment 408184
    Hi JasperD,

    Currently I can only select the date using mouse only. How I can code it so that keyboard also will enable to select it? (I mean using Tab on keyboard for scrolling).

    Thanks.

  7. #7
    Forum Expert JasperD's Avatar
    Join Date
    05-07-2013
    Location
    Netherlands
    MS-Off Ver
    Excel 2016
    Posts
    1,393

    Re: Using Datepicker in Userform VBA compatible to Excel 2013 64bit and 2007 32bit

    Do what it says - update them with the PtrSafe attribute

    To answer your other question - it can be done, but it's too much work for me to do so ;-)

  8. #8
    Registered User
    Join Date
    08-18-2012
    Location
    Malaysia
    MS-Off Ver
    Excel 2013
    Posts
    18

    Re: Using Datepicker in Userform VBA compatible to Excel 2013 64bit and 2007 32bit

    Quote Originally Posted by JasperD View Post
    Do what it says - update them with the PtrSafe attribute

    To answer your other question - it can be done, but it's too much work for me to do so ;-)
    I have been trying to find the solutions to PtrSafe attribute. How do I update them.

    I am so confusing right now.

  9. #9
    Registered User
    Join Date
    12-03-2011
    Location
    Walnut Cove, NC
    MS-Off Ver
    Excel 2016
    Posts
    78

    Re: Using Datepicker in Userform VBA compatible to Excel 2013 64bit and 2007 32bit

    I realize I am resurrecting an old thread, however, I am looking to use a date picker option for a macro I am using - I want to print a selection of sheets in a workbook based on a date in a particular cell on each sheet. I have the macro working, however, I would like to use a date picker to select the date versus entering it manually. I took a brief look at the date picker in the above file. I'm sure I can figure it out, was just wandering if there is something Microsoft has recently added? I will take a closer look at this and see if I can get it to work for my purposes.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Convert 32Bit to 64Bit
    By YasserKhalil in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-10-2015, 07:42 PM
  2. 64bit compatible code
    By dalai in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 11-04-2014, 11:40 AM
  3. my 32bit vba code won't run in 64bit
    By ncaravela in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-17-2014, 02:15 PM
  4. excel 2013 32bit error
    By ggomez43 in forum Excel General
    Replies: 0
    Last Post: 08-22-2013, 03:20 PM
  5. [SOLVED] GUID code for 32bit to work with 64bit also
    By BJ5352 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-24-2013, 06:59 AM
  6. Replies: 3
    Last Post: 11-23-2012, 01:57 AM
  7. Convert MostRecent Function from 32bit to 64bit (XP>WIN&)
    By bdb1974 in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 02-28-2012, 04:34 PM

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