+ Reply to Thread
Results 1 to 2 of 2

Writing cell reference to external workbook with VBA

  1. #1
    Registered User
    Join Date
    07-03-2012
    Location
    Norge
    MS-Off Ver
    Excel 2010
    Posts
    40

    Writing cell reference to external workbook with VBA

    I need to reference some cells in other workbooks, to build a trend of some values that change.
    To do this, I would like to use vba to write a simle reference formula to a given cell.

    I've come to the point where i use this code:
    Please Login or Register  to view this content.
    To get the following (example) result in the destination cell: C:\Users\konhenknu\Desktop\SPOC_log_dev\SPOC_log\[SPOC_log_2013_3.xlsm]Stopp Pr dag!$U$34

    Now all I need is to get this to become: (notice the characters highlighted in red)
    ='C:\Users\konhenknu\Desktop\SPOC_log_dev\SPOC_log\[SPOC_log_2013_3.xlsm]Stopp Pr dag'!$U$34

    I manage to get the last single quote in, but not the start of the formula.

    Here is the whole sub, in context:

    Please Login or Register  to view this content.
    Any help would be immensely appreciated!

    Best regards,
    Knut

  2. #2
    Registered User
    Join Date
    07-03-2012
    Location
    Norge
    MS-Off Ver
    Excel 2010
    Posts
    40

    Re: Writing cell reference to external workbook with VBA

    I found a solution after redoing my approach.

    Please Login or Register  to view this content.

+ 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. External reference with variable workbook name?
    By KenV in forum Excel - New Users/Basics
    Replies: 6
    Last Post: 02-04-2019, 06:21 PM
  2. Reference to External Workbook Objects
    By Rage in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 12-21-2009, 06:55 PM
  3. Replies: 2
    Last Post: 05-01-2009, 07:06 PM
  4. External workbook reference
    By mokreban in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-04-2009, 01:33 PM
  5. [SOLVED] Dynamic External Workbook reference
    By Co-op Bank in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 12-16-2005, 07:10 PM

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