+ Reply to Thread
Results 1 to 5 of 5

How to block cells with VBA

  1. #1
    Registered User
    Join Date
    04-09-2010
    Location
    madrid, spain
    MS-Off Ver
    Excel 2003
    Posts
    3

    How to block cells with VBA

    Hi,

    How can I block all cells except the first column with VBA in Excel 2003?

    Thanks in advance,
    Jose Luis

  2. #2
    Valued Forum Contributor rwgrietveld's Avatar
    Join Date
    09-02-2008
    Location
    Netherlands
    MS-Off Ver
    XL 2007 / XL 2010
    Posts
    1,671

    Re: How to block cells with VBA

    This code will LOCK all cells in the active worksheet, Unlock the ones in column A. Password is set to "password"

    Please Login or Register  to view this content.
    Looking for great solutions but hate waiting?
    Seach this Forum through Google

    www.Google.com
    (e.g. +multiple +IF site:excelforum.com/excel-general/ )

    www.Google.com
    (e.g. +fill +combobox site:excelforum.com/excel-programming/ )

    Ave,
    Ricardo

  3. #3
    Registered User
    Join Date
    04-09-2010
    Location
    madrid, spain
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: How to block cells with VBA

    Thanks for your help.

    When I try to change color in a unblocked cell:

    Range("A1:A1").Interior.Color = RGB(200, 160, 35)

    the 1004 error is returned. Why?

    Regards,
    Jose Luis

  4. #4
    Valued Forum Contributor rwgrietveld's Avatar
    Join Date
    09-02-2008
    Location
    Netherlands
    MS-Off Ver
    XL 2007 / XL 2010
    Posts
    1,671

    Re: How to block cells with VBA

    Change this part:
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    04-09-2010
    Location
    madrid, spain
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: How to block cells with VBA

    Now, I can't erase cells in unblocked cell· How I can give all the "permisions" to the unblocked cells?

    Regards,
    Jose Luis

+ 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