+ Reply to Thread
Results 1 to 12 of 12

Protect sheet issue

  1. #1
    Forum Contributor Bob@Sun's Avatar
    Join Date
    09-03-2009
    Location
    Montuak, Usa
    MS-Off Ver
    Excel 2007
    Posts
    438

    Protect sheet issue

    Hello,

    My user form has a line of code that protects the sheets and does not allow any changes and selection of cells. It worked great on my personla computer.

    Running the file on another computer the code does not protect the sheet. The strange thing is that if I go the Tools>Protection> the options is set to Unprotect. That measn that the code actually has protected the sheet but I am still able to make chages. If I manually unprotect and again protect the sheet, it is protected till the time close the file and open it again.

    Any suggestions for the reason of this strange behavior?
    Last edited by Bob@Sun; 01-21-2010 at 10:11 AM.

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

    Re: Protect sheet issue

    To best describe or illustrate your problem you would be better off attaching a dummy workbook, the workbook should contain the same structure and some dummy data of the same type as the type you have in your real workbook - so, if a cell contains numbers & letters in this format abc-123 then that should be reflected in the dummy workbook.

    If needed supply a before and after sheet in the workbook so the person helping you can see what you are trying to achieve.

    Doing this will ensure you get the result you need!
    Hope that helps.

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

    Free DataBaseForm example

  3. #3
    Forum Contributor Bob@Sun's Avatar
    Join Date
    09-03-2009
    Location
    Montuak, Usa
    MS-Off Ver
    Excel 2007
    Posts
    438

    Re: Protect sheet issue

    I my case I think that a dummy file won't help a lot, because the code is working fine on one computer and not on another. So even if I attach a workbook you might have it to work and still not understand what the problem is.

    That is why I did not provide the file. I told that someone may have experienced the same problem and have find the soluntion.

    I now tried the file on third computer and is working fine.

    Can't find the reason.

  4. #4
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,980

    Re: Protect sheet issue

    Do all the computers have the same exact version of Excel on them?
    Everyone who confuses correlation and causation ends up dead.

  5. #5
    Forum Contributor Bob@Sun's Avatar
    Join Date
    09-03-2009
    Location
    Montuak, Usa
    MS-Off Ver
    Excel 2007
    Posts
    438

    Re: Protect sheet issue

    Yes. We all use Excel 2003 and the code is writen with 2003

  6. #6
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,980

    Re: Protect sheet issue

    With the same updates and service packs applied? Check the exact version under Help - About Microsoft Office Excel on each machine.

  7. #7
    Forum Contributor Bob@Sun's Avatar
    Join Date
    09-03-2009
    Location
    Montuak, Usa
    MS-Off Ver
    Excel 2007
    Posts
    438

    Re: Protect sheet issue

    Ok I will check that and let you know if any difference.

    Thanks

  8. #8
    Forum Contributor Bob@Sun's Avatar
    Join Date
    09-03-2009
    Location
    Montuak, Usa
    MS-Off Ver
    Excel 2007
    Posts
    438

    Re: Protect sheet issue

    Well, on computers that have Ms Excel (11.8316.8221) SP3 the code works fine and potects the sheet correctly.

    My computer has Ms Excel (11.5612.5606) and the code does not protect the sheet. But, everything else is working fine with the macr. Just the protections is not working.

    Any ideas how can I make it so it works on all versions?

  9. #9
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,980

    Re: Protect sheet issue

    Update Office on your machine?

  10. #10
    Forum Contributor Bob@Sun's Avatar
    Join Date
    09-03-2009
    Location
    Montuak, Usa
    MS-Off Ver
    Excel 2007
    Posts
    438

    Re: Protect sheet issue

    It's Corporate...cant update and need to run the file correctily on all 150 computers.

    any otyher ideas?

  11. #11
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,980

    Re: Protect sheet issue

    If the same code works on multiple machines that have been updated and fails on machines that haven't, it stands to reason that something in one of the updates fixed a bug, rather than there being anything wrong with the code. (of course, we haven't actually seen the code, so I'm just going on logic here)
    The fact that your machines are not all on the same level in a corporate environment is frankly slightly worrying too!

  12. #12
    Forum Contributor Bob@Sun's Avatar
    Join Date
    09-03-2009
    Location
    Montuak, Usa
    MS-Off Ver
    Excel 2007
    Posts
    438

    Re: Protect sheet issue

    Well I got to update my computer and everything is ok.

    I guess we have to update all computers.

    Thanks for the help!

+ 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