Results 1 to 5 of 5

Opening an Excel Worksheet Which Is Password Protected from Editing

Threaded View

  1. #1
    Registered User
    Join Date
    07-24-2019
    Location
    United Kingdom
    MS-Off Ver
    2016
    Posts
    3

    Opening an Excel Worksheet Which Is Password Protected from Editing

    Hi all,

    I'm new to VBA coding, but have programmed in VB.NET for years, amongst other languages which are irrelevant to list here.

    I currently have been required to "come up with a solution to" opening an excel document with an Microsoft Access Control Panel-like page. (Well that's already done)
    The system has been set up by someone prior to myself, and I am tasked to improve some little things in the macros that manipulate the data.

    The code that opens the excel document to run a macro contained inside was taken directly from a site I stumbled upon, and I noticed the similarity straight away.

    Credit: access-excel . t i p s / run-excel-macro-from-access-vba

    The problem is, is that the excel document this access code opens is password protected from editing. So the user has to manually type the password.
    I was asked to find a way to enter the password programmatically, so the prompt for password does not popup. So I thought, there most be a way to pass in the password as command line argument when opening the file.
    But I cannot find any command line parameters that would do this.

    Now, I could write a AutoIt script to enter this password easy as pie, but I think this won't be acceptable as its a bit "screen level", but is an option I will bring up if this turns out to be impossible.

    And no, removing the password altogether is not something I have control over.

    I also saw, a method... ActiveWorkbook.unprotect(password) which may work? But I haven't tested yet, and it may not even work if the password prompt is already visible.
    Attached Images Attached Images

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 0
    Last Post: 09-06-2005, 12:05 PM
  2. Replies: 0
    Last Post: 09-06-2005, 10:05 AM
  3. Replies: 0
    Last Post: 09-06-2005, 07:05 AM
  4. Replies: 0
    Last Post: 09-06-2005, 03:05 AM
  5. Replies: 0
    Last Post: 09-06-2005, 12:05 AM
  6. Replies: 0
    Last Post: 09-05-2005, 11:05 PM
  7. Replies: 1
    Last Post: 06-23-2005, 08:05 PM
  8. Replies: 0
    Last Post: 06-23-2005, 07:05 PM

Tags for this Thread

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