+ Reply to Thread
Results 1 to 3 of 3

Error 1004

  1. #1
    Registered User
    Join Date
    12-16-2021
    Location
    Belgium
    MS-Off Ver
    /
    Posts
    12

    Error 1004

    Hello,

    I've created an excel sheet (see attachment - tabsheet 1) where users can only fill in the cells in grey, remaining white cells are password protected to prevent them from editing.
    I've created now a VBA code to hide / unhide certain rows based on input given in the tabsheet, however when I password protect this sheet I receive follow error:

    Please Login or Register  to view this content.
    VBA code works, password protection works, but the combination of the two doesn't work. Any idea what causes the issue?

    Thanks for the help.

    Edit: if I post my VBA code in the [code] brackets I get a firewall acces denied.. However, my VBA code is in the excel example.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    08-17-2007
    Location
    Poland
    Posts
    2,222

    Re: Error 1004

    Add the highlighted fragment at the beginning of the procedure:
    Please Login or Register  to view this content.
    Artik

  3. #3
    Registered User
    Join Date
    12-16-2021
    Location
    Belgium
    MS-Off Ver
    /
    Posts
    12

    Re: Error 1004

    Hello Artik,

    Works perfectly, much appreciated for the prompt response!

    Cara Pils

+ 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. VBA error: runtime error 1004 : Method range of object - 'Global' failed.
    By Afjio12 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-28-2019, 04:37 AM
  2. [SOLVED] I am getting error as "Run Time error '1004' Microsoft excel cannot paste the data
    By Amittapre in forum Excel Programming / VBA / Macros
    Replies: 43
    Last Post: 03-24-2017, 04:40 PM
  3. Runtime error '1004': Paste special method of range class error.
    By Daryl Zer0 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 11-05-2014, 01:44 AM
  4. [SOLVED] Sort Macro Run-time error '1004': Application/Object-defined error.
    By sam1212 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-22-2014, 10:05 AM
  5. [SOLVED] VBA Error: Runtime Error 1004: AutoFilter method of Range class failed
    By jl22stac in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-03-2013, 07:27 PM
  6. Error "run-time Error '1004': General Odbc Error
    By D4WNO77 in forum Access Tables & Databases
    Replies: 2
    Last Post: 07-16-2012, 09:55 AM
  7. Error 75 File/Path access error, sometimes Error 1004
    By smokebreak in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 02-16-2011, 02:35 PM

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