+ Reply to Thread
Results 1 to 3 of 3

Macro - Password

  1. #1
    Registered User
    Join Date
    08-22-2013
    Location
    UK
    MS-Off Ver
    Excel
    Posts
    2

    Macro - Password

    Hi All

    I'm using a macro to protect a selection of cells within multiple identical work sheets.

    I noticed only the original sheet that the macro is recorded on is protect with the actual password, the other sheets are protect but no password is needed to unprotect them.

    Is there away round this? what am i doing wrong?

    P.s. i'm a newb this is the first macro i have ever run

    Any thoughts appreciated

    Thanks

  2. #2
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,198

    Re: Macro - Password

    Hi, Curious-George,

    show us what you have?

    Please Login or Register  to view this content.
    And you should alter the thread title to a more fitting one.

    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  3. #3
    Registered User
    Join Date
    08-22-2013
    Location
    UK
    MS-Off Ver
    Excel
    Posts
    2

    Re: Macro - Password

    Hi thanks for the reply

    this is it just copied and pasted

    Sub Macro1()
    '
    ' Macro1 Macro
    '

    '
    Cells.Select
    Selection.Locked = False
    Selection.FormulaHidden = False
    Range("A4:A40").Select
    Selection.Locked = True
    Selection.FormulaHidden = False
    Range("K2").Select
    ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True _
    , AllowFormattingCells:=True, AllowFormattingColumns:=True, _
    AllowFormattingRows:=True, AllowInsertingColumns:=True, AllowInsertingRows _
    :=True, AllowInsertingHyperlinks:=True, AllowDeletingColumns:=True, _
    AllowDeletingRows:=True, AllowSorting:=True, AllowFiltering:=True, _
    AllowUsingPivotTables:=True
    Columns("H:I").Select
    Selection.EntireColumn.Hidden = True
    End Sub

+ 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. Replies: 6
    Last Post: 02-09-2013, 03:06 AM
  2. password protection-is there anyway to put a password on running a macro in excel?
    By Solarissf in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-12-2008, 10:06 AM
  3. [SOLVED] How to see macro code of a password protected macro without a password?
    By Dmitry Kopnichev in forum Excel General
    Replies: 5
    Last Post: 10-27-2005, 05:05 AM
  4. [SOLVED] How to see macro code of a password protected macro without a password?
    By Dmitry Kopnichev in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-27-2005, 05:05 AM
  5. [SOLVED] How to see macro code of a password protected macro without a password?
    By Dmitry Kopnichev in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-27-2005, 05:05 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