+ Reply to Thread
Results 1 to 4 of 4

How do I initialize Toggle Button Value when opening workbook?

  1. #1
    Forum Contributor sauerj's Avatar
    Join Date
    11-11-2009
    Location
    Lafayette, IN
    MS-Off Ver
    Excel 2019
    Posts
    163

    Smile How do I initialize Toggle Button Value when opening workbook?

    When opening a workbook, I'd like to set a Toggle Button's value to TRUE. I already have code Workbook_Open() procedure which resides in the ThisWorkbook module. This Workbook_Open() procedure already does lots of other things. I would like to add code in Workbook_Open() that would set the Toggle Button's initial value (TRUE). The code for the Toggle Button resides in one of the Sheet modules (not the ThisWorkbook module). I attempted to set this toggle button value using the following code (see row 10), but it does not pass the compiler due to not being a defined variable. I am unable to find any HELP on the internet. Can you help me?
    Please Login or Register  to view this content.
    Below, I have added the code for the Toggle Button itself (for its CLICK event). I want to set (or initialize) the value of this Toggle Button to TRUE when the workbook is opened. And, hopefully do this within the Workbook_Open procedure.
    Please Login or Register  to view this content.
    Last edited by sauerj; 01-27-2010 at 11:03 PM. Reason: Adding Toggle Button code for any help this might provide

  2. #2
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,342

    Re: How do I initialize Toggle Button Value when opening workbook?

    Hi sauerj
    It depends
    Please Login or Register  to view this content.
    what do you have or
    Please Login or Register  to view this content.
    If the solution helped please donate to RSPCA

    Site worth visiting: Rabbitohs

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

    Re: How do I initialize Toggle Button Value when opening workbook?

    Just add thisline to the Open event,make sure the sheet & button nams are changed to the correct ones for your workbook
    Please Login or Register  to view this content.
    Last edited by royUK; 01-10-2010 at 06:03 AM.
    Hope that helps.

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

    Free DataBaseForm example

  4. #4
    Forum Contributor sauerj's Avatar
    Join Date
    11-11-2009
    Location
    Lafayette, IN
    MS-Off Ver
    Excel 2019
    Posts
    163

    Smile Re: How do I initialize Toggle Button Value when opening workbook?

    It worked great! Thanks! Amazing what ONE word will do. I will marked it as SOLVED. Thanks again!

+ 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