+ Reply to Thread
Results 1 to 2 of 2

VBA to save a worksheet with ComboBoxes and not allow it to be edited when reopened

  1. #1
    Registered User
    Join Date
    01-21-2012
    Location
    Mount Pleasant, WI
    MS-Off Ver
    Excel 2010
    Posts
    23

    VBA to save a worksheet with ComboBoxes and not allow it to be edited when reopened

    I'm trying to write VBA to save a worksheet that contains 50 ComboBoxes and I would like the save worksheet. When the saved worksheet is opened it needs to be locked so that it cannot be edited.

  2. #2
    Valued Forum Contributor AlvaroSiza's Avatar
    Join Date
    09-19-2007
    Location
    Staffordshire
    MS-Off Ver
    2007
    Posts
    591

    Re: VBA to save a worksheet with ComboBoxes and not allow it to be edited when reopened

    How about using a trigger value in an out of focus cell or hidden worksheet that goes to 1 if the combo boxes have changed. Then in the workbook_open event read the value of the trigger cell such that If 1 then set locked property for each combo box to True?
    Perhaps it was the Noid who should have avoided me...
    If you are satisfied with my solution click the small star icon on the left. Thanks
    1. Make a copy of your workbook and run the following code on your copy (just in case)
    2. With excel open, press ALT+F11 to open the Visual Basic Editor (VBE). From the "Insert" menu, select "Module".
    3. Paste the code from above into the empty white space. Close the VBE.
    4. From the developer tab, choose "Macros", select the Sub Name, and click "Run".

+ 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