+ Reply to Thread
Results 1 to 1 of 1

Edit data connection links using VBA

  1. #1
    Registered User
    Join Date
    09-20-2012
    Location
    uttoxeter
    MS-Off Ver
    Excel 2010
    Posts
    8

    Edit data connection links using VBA

    Hi

    Over many years I've been developing a spreadsheet for quotations which uses a front end 'masterquote.xlsm' file & backend 'quoteprices.xlsx' file.
    The front end I update as & when I find new things to add etc. & then copy this file to other users machines. They then use it as a template to create a quote & save them with quote number.xlsx
    The back end file is used to store a lot of pricing data.

    When the front end is opened the following code opens the back end .xlsx:-

    Please Login or Register  to view this content.
    In general this works fine but is reliant on the back end being in a specific location.
    There have been occasions where this location is not accessible, either due to the machine being off, being upgraded or working from home as currently.
    What i'd like to do is develop this code so that if the location isn't found it asks me to locate the file & saves the new location in this code.

    Also, as both front end & back end spreadsheets are password protected, whenever the location of the files changed, i used to manually unprotect each worksheet & use the 'edit links' data connection.
    I added a module in the front end to help this using the following code to unprotect all the sheets in both front & back ends to save time:-

    Please Login or Register  to view this content.
    But I still need to manually do the 'edit links' process & then run the same code with .protect to reset the protection.
    Is it possible to elaborate the first set of code to do the 'edit links' process automatically after unprotecting.

    Finally, as I currently have a large number of existing quote files that will be looking in a specific location for the back end prices, i'd like some code that runs through all .xlsm files in a directory that 'posts' this new code into them so that when they are opened in future they automatically know where the new back end prices are ?

    I know it sounds complicated but i hope i've managed to get across what i'm trying to achieve.

    Thanks in advance for any assistance.
    Last edited by jeffreybrown; 03-30-2020 at 09:15 AM. Reason: Please use code tags!

+ 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: 2
    Last Post: 05-17-2018, 10:43 AM
  2. Replies: 4
    Last Post: 09-17-2016, 12:38 PM
  3. Loop needed to edit links based on data in cells
    By Renoix in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-23-2016, 02:38 PM
  4. Edit edit links macro to automate sheet selection
    By sds1126 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-07-2015, 12:27 PM
  5. Marco for DATA Edit Links; Open Source
    By Maharachi in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-13-2013, 06:28 AM
  6. Edit Links showing links which are not in workbook
    By Bishonen in forum Excel General
    Replies: 4
    Last Post: 03-11-2013, 05:29 AM
  7. Edit Links: Changing links on a protected worksheet
    By Halibut68 in forum Excel General
    Replies: 0
    Last Post: 04-28-2006, 06:10 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