+ Reply to Thread
Results 1 to 3 of 3

Referencing specific workbook when loading data

  1. #1
    Registered User
    Join Date
    06-30-2017
    Location
    London
    MS-Off Ver
    365
    Posts
    10

    Referencing specific workbook when loading data

    I have a main workbook where the file name is likely to change.

    There is a load macro which opens a another specific xlsx and transfers data into the main xlsx.

    When I created the load routine it keeps the name of the main xlsx in the code. When the name of the main xlsx changes the code will obviously fail (as the name of the main xlsx has been changed).

    It's more of a structure question, but can anyone suggest a way round this?

    Many thanks

    Andrew

  2. #2
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,467

    Re: Referencing specific workbook when loading data

    Hi there,

    It's VERY difficult to give a definitive answer based on the little information you provide, but you could try using e.g.:

    Please Login or Register  to view this content.
    instead of:

    Please Login or Register  to view this content.
    This would ensure that your code is unaffected by changes to the workbook name.


    Hope this helps.

    Regards,

    Greg M

  3. #3
    Registered User
    Join Date
    06-30-2017
    Location
    London
    MS-Off Ver
    365
    Posts
    10

    Re: Referencing specific workbook when loading data

    Hi Greg, Sorry to take so long to come back and thank you for your help.

    This works well

    Thanks You!

    Andrew

+ 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. [SOLVED] help loading data from 2 different sheets on one workbook
    By kevinu in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-03-2019, 05:56 PM
  2. [SOLVED] Pulling specific data from a specific sheet, loading to a temp sheet, for forwarding.
    By Fawkes_ in forum Excel Programming / VBA / Macros
    Replies: 39
    Last Post: 02-17-2017, 11:10 AM
  3. Loading Data from Table into Specific Cells
    By jdude in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-11-2016, 07:03 AM
  4. [SOLVED] Multiple excel data loading to seperate workbook
    By ranjan20 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-09-2015, 06:15 PM
  5. Referencing a Cell to Use a Specific Workbook
    By Gittelman in forum Excel General
    Replies: 6
    Last Post: 08-01-2014, 02:27 AM
  6. Loading a specific sheet in a workbook on opening Excel
    By LEEP2008 in forum Excel General
    Replies: 2
    Last Post: 09-24-2009, 03:56 PM
  7. [SOLVED] Referencing and loading Solver programatically - how?
    By CodeMonkey in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 05-04-2006, 12:50 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