+ Reply to Thread
Results 1 to 2 of 2

Opening protected files with macros

  1. #1
    Forum Contributor
    Join Date
    04-15-2008
    Location
    Texas, USA
    MS-Off Ver
    M365 Excel Version 2210
    Posts
    198

    Opening protected files with macros

    URGENT PLEASE HELP

    I have two macro-enabled workbooks that I have attached for reference. The file called Dest (for Destination) reads cells from the file Source. This file is to contain a button that opens the source file by reading the file path\name from G5 and reading the password from M2. The path\name for the Source file is shown in G5 in the Dest file. This code worked when both file were in the same desktop directory but when I put them in different directories on my work server it can’t open it.

    How do I need to change the code to make it work?

    Thanks, as I REALLY would appreciate you help.
    RR
    Attached Files Attached Files

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,366

    Re: Opening protected files with macros

    I might be missing something here, but you need to give it the full path to the location where the file is now, rather than pointing to your desktop.

    So, just change G5 to the right location. Works for me, picking up the Source file from my Downloads folder. Or, if the location is not fixed, add a File Open dialogue box.

    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


+ 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