+ Reply to Thread
Results 1 to 3 of 3

All cells protected after using a combo box

Hybrid View

  1. #1
    Registered User
    Join Date
    08-12-2014
    Location
    Carson City, NV
    MS-Off Ver
    2013
    Posts
    8

    All cells protected after using a combo box

    I'm using Excel 2013. I created an application for bidding that has a workbook (BID) where you enter an estimate for material and is linked to a workbook (PRICEBOOK) that contains the price book tables. I have a number of ActiveX Combo boxes on a worksheet in the BID workbook that use named fill ranges from the PRICEBOOK workbook. All has worked fine for some time until about the time MS issued the last update that caused my ActiveX items to quit working. I deleted the ".exd" files and it seemed to fix everything EXCEPT this. Now if I am on the bid page and choose a combo box and select an item from the list, everything works properly. Here is where the issue starts - I have ActiveX buttons that launch the following code to add rows as needed to the estimate. (see below) When I run that macro, then choose a combo box again, the combo box works and I can make a selection fine, BUT now when I click on what should be an unprotected cell after making that selection (i.e. I want to change the quantity on that row) all cells act as if they are protected - I cannot make an entry or select the cell. If I run the code to add a row again everything returns to normal until such time as I select another combobox and then I have to go through the process of adding or hiding a row again in order to allow entry in the unprotected cells. Here is the twist. This happens when I am running this application on my iMac using bootcamp and Windows 8.1. (I've never had any indication of a difference running any windows apps on my Mac vs PC.) When I run the application on my PC laptop (Windows 8.1 and Excel 2013) I do not have the issue - although I did when I first had the issue after the last Excel update. (It seemed to resolve when I deleted the .exd files).

    Anyone have any ideas? I'm stumped! (among other things!)

    Here is the typical code for adding rows. I have basically the same for hiding rows

    PHP Code: 
    Private Sub NextButtonB_Click()
    Application.ScreenUpdating False
    Sheets
    ("BID").Select
        ActiveSheet
    .Unprotect
    Rows
    ("24:27").Select
        Selection
    .EntireRow.Hidden False
    Sheets
    ("BID").Select
        ActiveSheet
    .Protect DrawingObjects:=TrueContents:=TrueScenarios:=True
    Application
    .ScreenUpdating True
    End Sub 

  2. #2
    Registered User
    Join Date
    08-12-2014
    Location
    Carson City, NV
    MS-Off Ver
    2013
    Posts
    8

    Re: All cells protected after using a combo box

    Still having this issue. It is appearing on computers that were working for some time. Here is as simple of a restatement of the issue as I can make:

    I have a number of Active X combo boxes that use Fill Ranges from another workbook. When I use one of the combo boxes, every thing seems to work normal except including the fact that you cannot select protected cells and you can select unprotected cells (So sheet protection seems to be working fine). The problem is even though you can select an unprotected cell, you cannot type in it.

    I have deleted .exd files, ran Fixit, and made sure all are on same versions.

    Running the procedure in my previous post restores functionality until the next time you use a combo box.

    Help!

  3. #3
    Registered User
    Join Date
    08-12-2014
    Location
    Carson City, NV
    MS-Off Ver
    2013
    Posts
    8

    Re: All cells protected after using a combo box

    This issue appears to be resolved, but not sure why I had the issue. I finally realized that this issue occurred anytime I ran a procedure that contained:

    Application.ScreenUpdating = False (or True)

    I commented these lines out and everything works now. I believe I read that procedures should begin with code to turn of screen updating and end with turning it back on.

    The puzzling thing is that it is intermittent on my computer. (Today, I started having the issue again and the fix above appears to have fixed it.) I installed the spreadsheets in an office with 5 computers and on 4 there is no problem. On 1 it is always a problem. The issue began after the update to Excel 2013 in December.

    Anyone have any ideas as to:

    1) Am I wrong in thinking that I should have added this code to my procedures?

    2) Assuming I was not wrong, is there something wrong about the way I used the code?

    A typical macro that caused the issue is shown below (without the lines commented out)

    Private Sub NextButtonB_Click()
    Application.ScreenUpdating = False
    Sheets("BID").Select
    ActiveSheet.Unprotect
    Rows("24:27").Select
    Selection.EntireRow.Hidden = False
    Sheets("BID").Select
    ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
    Application.ScreenUpdating = True
    End Sub

+ 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. Protected Worksheet bug with combo boxes
    By stevepic01 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-12-2014, 04:49 AM
  2. clear password protected combo
    By superchew in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-16-2013, 04:54 PM
  3. Combo box in a Protected Sheet
    By Quagga in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-28-2011, 04:52 PM
  4. Protected Combo Box
    By owainl in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-19-2009, 01:57 PM
  5. Combo-box fails in a protected sheet
    By pacharbo in forum Excel General
    Replies: 2
    Last Post: 10-13-2006, 02:54 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