+ Reply to Thread
Results 1 to 2 of 2

Macro unprotect, refresh query, protect - Run from CommandButton in other worksheet

  1. #1
    Registered User
    Join Date
    09-24-2012
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    3

    Macro unprotect, refresh query, protect - Run from CommandButton in other worksheet

    Hi,

    I have a protected worksheet, I have the below code which unprotects, updates, and then reprotects. I have been able to add a CommandButton within this sheet which runs the macro, however my problem is whenever I put a CommandButton in another worksheet I receive error 1004. It doesn't seem to be able to reference the sheet I am trying to update.

    Any assistance in resolving this would be greatly appreciated. I would also like to make the password private - therefore prompting the user to enter the password.
    Thank you

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.

  2. #2
    Registered User
    Join Date
    07-27-2012
    Location
    Malaysia
    MS-Off Ver
    Excel 2007/2010
    Posts
    86

    Re: Macro unprotect, refresh query, protect - Run from CommandButton in other worksheet

    Try to change this
    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.
    Boon

+ 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