+ Reply to Thread
Results 1 to 7 of 7

save state of a custom checkbox on ribbon

  1. #1
    Forum Contributor
    Join Date
    12-25-2012
    Location
    gent,belgium
    MS-Off Ver
    Excel 2021
    Posts
    146

    save state of a custom checkbox on ribbon

    Hi
    Ive made a new checkbox on the ribbon.
    How can i save the status in the register. And by reopen the work see if the checkbox is checked ore not
    Last edited by glda19; 10-29-2019 at 11:49 AM.

  2. #2
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481

    Re: save state of a custom checkbox on ribbon

    Hi there,

    I think you'll need to save the state of the Checkbox somewhere in your workbook (cell, named constant etc.) and then, when the workbook is opened, invalidate the Checkbox to set its state in accordance with the stored value.

    Hope this helps.

    Regards,

    Greg M

  3. #3
    Forum Contributor
    Join Date
    12-25-2012
    Location
    gent,belgium
    MS-Off Ver
    Excel 2021
    Posts
    146

    Re: save state of a custom checkbox on ribbon

    you can save that in the registry

  4. #4
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481

    Re: save state of a custom checkbox on ribbon

    Hi again,

    You can save it in the registry only if your Admin people allow you to do so - saving it in the workbook keeps things fully under your own control.

    Regards.

    Greg M
    Last edited by Greg M; 11-02-2019 at 07:58 AM.

  5. #5
    Registered User
    Join Date
    11-22-2019
    Location
    texas
    MS-Off Ver
    2013
    Posts
    9

    Re: save state of a custom checkbox on ribbon

    Thanks for your response.

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

    Re: save state of a custom checkbox on ribbon

    You can also save the value in a 'Built In' or 'Custom' Document Property.

    For example:
    Please Login or Register  to view this content.
    See the file associated with post #4 in the following thread for a working file that contains the above code: http://www.excelforum.com/excel-gene...tact-info.html

    In Excel 2016 you can see the properties: File > Info > Properties (top right) > Advanced Properties

    Lewis

  7. #7
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,430

    Re: save state of a custom checkbox on ribbon

    VBA has the savesetting and GetSetting methods to read/write to registry.

    https://docs.microsoft.com/en-us/off...6)%26rd%3Dtrue
    Cheers
    Andy
    www.andypope.info

+ 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. [SOLVED] Custom Ribbon Toggle Button, how do I change state with VBA?
    By dd12 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-24-2019, 11:27 AM
  2. get status checkbox on custom menu ribbon.
    By glda19 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-16-2019, 02:19 PM
  3. Put VBA ribbon together with Custom UI Editor Ribbon
    By czarlando in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-23-2016, 05:46 AM
  4. [SOLVED] Activate button upon checkbox selection in custom ribbon
    By SunOffice in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-17-2015, 09:26 PM
  5. [SOLVED] An alternative to the Add-Ins ribbon tab - Global Custom Ribbon Tab by Ken Puls
    By mc84excel in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-16-2014, 10:01 PM
  6. [SOLVED] Dynamic menu arrays (custom ribbon tab) only partly rebuilt after loss of state recovery
    By mc84excel in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-11-2013, 09:57 PM
  7. [SOLVED] Can VB Save hidden/grouped columns state, unhide all, then restore columns to saved state
    By JTwrk in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-27-2012, 02:54 PM

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