Results 1 to 5 of 5
  1. #1
    ironfelix717 is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Oct 2018
    Posts
    150

    VBA Color Pickers, x64 solutions

    So,

    Because if theres anything I know about Access... its that the simplest most trivial task requires a deep dive into Win API because
    MS couldn't write libraries that the other Applications in VBA could all share.
    (A toddler could call the Excel RGB picker.....) I digress


    Does anyone know of an RGB Color picker that....

    1.) Suppoted on x64

    2.) Is actually written well (i.e. single function opens dialog and returns RGB OLE long when closed)

    3.) supports every color

    4.) Free



    Tried...............


    1.)
    Not free, demo works very well.
    https://www.microsoftaccessexpert.co...or-Picker.aspx

    2.)
    Nice, sweet, and short code. Doesn't work. Hex value returned is incorrect
    and the code has almost no explanation how its supposed to work.
    (it passes the selection of the picker to variable lngColor)
    Good attempt. - maybe a x64 issue.


    https://gist.github.com/dreller/17f4...c439364b67e84b


    3.)
    Code has compile error on x64 - fails in ShowColorDialog at
    Code:
    .lpCustColors = VarPtr(aColorRef(0))
    Tried messing around with Long/LongPtr, not sure.
    http://www.mendipdatasystems.co.uk/c...ter/4594450413


    4.) Custom form solution - cool but doesnt support all colors,
    plus i'd rather just stick to native picker.
    https://www.access-programmers.co.uk...picker.271714/

  2. #2
    davegri's Avatar
    davegri is online now Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,389
    ColorPicker-davegri-v01.zip

    Here's something I cobbled together 3 or 4 years ago. I don't remember the various sources and don't know if it will work 64bit, but it does use PtrSafe for compatibility.

  3. #3
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,954
    Re my item 3 above.
    Thanks I will look into that VarPtr error which somehow slipped through earlier checks. That part of the code isn't mine.
    However the Colour Converter feature definitely works in 64-bit and I believe fulfils your criteria

    EDIT
    Re item 2
    Suggest you also review the code athttps://social.msdn.microsoft.com/Fo...orum=accessdev
    Please post the solution if you find it
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  4. #4
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,954
    I believe I have now fixed the issue in my version of the ColorPicker code.
    Version 2.2 attached. Checked & working in both 32-bit & 64-bit.

    Please let me know whether it also works for you in 64-bit
    Attached Files Attached Files
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  5. #5
    ironfelix717 is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Oct 2018
    Posts
    150
    isladogs
    I believe I have now fixed the issue in my version of the ColorPicker code.
    Version 2.2 attached. Checked & working in both 32-bit & 64-bit.

    Please let me know whether it also works for you in 64-bit
    Colin,
    The new revision works seamlessly on x64 Win 10 Access 2019 (all i tried was the picker in frmColourCategories). Haven't actually dug into the code, but i expect no issues.
    Thanks for the fix!


    Dave:
    Have not looked at that yet but will archive if having troubles with the other solution.


    Thanks all - solved
    regards

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 32
    Last Post: 03-01-2019, 08:01 AM
  2. DB hosting solutions
    By ahill48 in forum Access
    Replies: 8
    Last Post: 08-20-2017, 10:26 AM
  3. Solutions for reaching data limits?
    By drr1970 in forum Access
    Replies: 3
    Last Post: 08-08-2017, 06:52 PM
  4. Replies: 4
    Last Post: 09-07-2016, 07:38 AM
  5. Multiuser Access Solutions?
    By GaryE in forum Access
    Replies: 4
    Last Post: 04-16-2013, 06:15 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums