+ Reply to Thread
Results 1 to 2 of 2

How to bypass password prompt and open workbook in read only mode.

  1. #1
    Registered User
    Join Date
    09-20-2012
    Location
    Peoria, Arizona
    MS-Off Ver
    Excel 2013
    Posts
    39

    Red face How to bypass password prompt and open workbook in read only mode.

    Hello folks,

    I have been searching for a while for a macro which will bypass the prompt that directs you to enter your password or open in read only when you open an excell worksheet. I assume this will need to me entered into the VBA folder titled "This Workbook". I will have about 80 end users and I am trying to avoid as many prompts as possible. I have eliminated the 'Active X' prompt and understand that you cannot bypass the 'enable macros' prompt.

    My question is, Can I add something to he programing I have to eliminate the opening prompt to enter a password and to automatically open the file as read only? This is what I have so far to remove the active X warning and to open a navigation form I built:

    Private Sub Workbook_Open()
    RemoveActiveXPrompts
    Application.DisplayFullScreen = True
    Sheets("Sheet1").Select
    Range("A1").Select
    Navigator.Show vbModeless
    End Sub

    I am hoping for help to include programing to eliminate the password promt and to open workbook in read only mode. Any help would be greatly appreciated.

    BTW, I am running Excell 2003 if that makes any difference. Thanks again

  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,197

    Re: How to bypass password prompt and open workbook in read only mode.

    Hi, Tazyote,

    to my not so deep knowledge of the application model you would need to open the workbook from another one passing the password for opening as well (as I understood the password protection this action is accessed prior to any event from the opening workbook).

    If you open the workbook from another one you can specify the opening process for opening as read-only. If it should work from within the workbook you should have a look at the ChangeFileAccess-Method and check out whether the access can be changed in XL11 (I´m only sure it´s not doing so in XL9 but it works in XL14).

    Could you please use Code-Tags to display the procedure? TIA.

    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

+ 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