+ Reply to Thread
Results 1 to 2 of 2

Link cell from one open workbook to another

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    03-05-2015
    Location
    norwich
    MS-Off Ver
    365
    Posts
    107

    Link cell from one open workbook to another

    Hi,

    I'm having a little trouble linking one cell to another. My objective is to paste an updating chart from one workbook to another and also link just one cell from one to another

    The chart part works but I can't get one cell to link to another

    Basically I want D12 from DestWB to always reference the value from J5 in the SrcWB. I'm obviously missing a trick!


    Dim my_FileName As Variant
    Dim DestWB As Workbook: Set DestWB = ActiveWorkbook
    Dim UserChoice
    Dim SrcWB As Workbook
    
    Application.ScreenUpdating = False
    On Error Resume Next
    'clear any charts
    ActiveSheet.ChartObjects.Delete
    
    'Open
    my_FileName = Application.GetOpenFilename
    If my_FileName <> False Then
    
    Workbooks.Open Filename:=my_FileName
    Else
    Exit Sub
    End If
    
    Set SrcWB = ActiveWorkbook
    
    'Paste linked chart
    
    SrcWB.Worksheets("Timeline").Activate
    ActiveSheet.ChartObjects("Timeline").Activate
    ActiveChart.ChartArea.Copy
    DestWB.Worksheets("Laboratory").Activate
    ActiveSheet.Range("B17").Select
    ActiveSheet.Paste
    
    '
    'Range("d12") = SrcWB.Worksheets("Timeline").Range("j5")
    Thanks for any help

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Link cell from one open workbook to another

    I do not understand your issue, a simple formula will do that for you

    Formula: copy to clipboard
    =[Book1]Sheet1!$A$1


    Formula: copy to clipboard
    =[SrcWB]Sheet("Timeline")!$J$1
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

+ 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: 11-11-2017, 07:40 AM
  2. Link not working when source workbook is open
    By Renoix in forum Excel General
    Replies: 6
    Last Post: 03-09-2016, 04:43 PM
  3. [SOLVED] Link (closed)workbook to (open)workbook
    By Jón Ingi in forum Excel General
    Replies: 8
    Last Post: 07-25-2014, 04:18 AM
  4. Replies: 0
    Last Post: 10-11-2012, 10:48 PM
  5. Link only works when link workbook is open
    By carsto in forum Excel General
    Replies: 4
    Last Post: 05-08-2009, 09:03 AM
  6. need to link without having source workbook open
    By adbowe in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 08-18-2006, 07:45 AM
  7. Need VB code for workbook open to open a link
    By Daniel Baker in forum Excel General
    Replies: 2
    Last Post: 08-17-2006, 08:35 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