Results 1 to 8 of 8

Unprotect method of Worsheet class failed; Run-time error '1004':

Threaded View

  1. #1
    Registered User
    Join Date
    06-13-2013
    Location
    Texas, US
    MS-Off Ver
    Excel 2010
    Posts
    11

    Unprotect method of Worsheet class failed; Run-time error '1004':

    Good afternoon,

    I was looking for clarification on an error message from what I had read on the forum. For Excel 2007, it cannot be done, but unsure if any changes for 2010 allow for it.

    I am using Excel 2010, running vba on a protected sheet. I am attempting to “Share Workbook” on a shared network. After sharing, as soon as I click on my command button, it generates the error:
    Unprotect method of Worsheet class failed; Run-time error '1004':

    Has anyone found a work around for this?

    Here is one of my buttons vba:

    Dim wsWorksheet                 As Worksheet
    ActiveSheet.Unprotect ""
    ActiveSheet.Range("$A$1:$A$501").AutoFilter Field:=1
    ActiveSheet.Protect "", True, False
    For Each wsWorksheet In ActiveWorkbook.Worksheets
            wsWorksheet.Protect Password:=""
        Next
    End Sub
    Last edited by stevesince1981; 09-26-2013 at 10:50 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Run-time error 1004 paste method of worksheet class failed
    By Castillb in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 08-12-2013, 02:24 PM
  2. Run time error 1004 select method of class failed
    By Doruli in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 03-14-2013, 04:50 AM
  3. Run-time error '1004': Select method of Range class failed.
    By pspikym90 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 11-19-2012, 06:15 PM
  4. Run-time error '1004' ; AutoFilter Method of Range class failed
    By ESMAMAF in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-18-2012, 06:30 PM
  5. Replies: 1
    Last Post: 07-15-2011, 08:27 AM

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