View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
voodooJoe voodooJoe is offline
external usenet poster
 
Posts: 43
Default Automatically Update Cells bases on another workbook.

thom -

below is from another post i did.
you could also just use a link formula (e.g.,
=c:\data\[mybook.xls]sheet1!$a$1)
or you couls just put both worksheets in the same workbook

cheers - voodooJoe

Sub c()
srcpath = "C:\SFADB"
srcbook = "random.xls"
srcsheet = "R1"

aydes = Array("c1:c6", "d1:d6", "e1:e6")
aysource = Array("$A$5:$A$10", "$b$5:$b$10", "$b$5:$b$10")

Set wsdes = Sheet

For i = LBound(aydes) To UBound(aydes)
With wsdes.Range(aydes(i))
.FormulaArray = "='" & srcpath & "\[" & srcbook & "]" & srcsheet &
"'!" & aysource(i)
.Copy
.PasteSpecial xlPasteValues
End With
Next i
Application.CutCopyMode = False
Set wsdes = Nothing
End Sub

edit to fit

- voodooJoe


"thom hoyle" wrote in message
...
I looked at all the posting regarding update and could find no solution to
my
quest.

I have two workbooks open,
1. MastedSum.xls
2. DailySums.xls

MasterSum has references to cells in DailySums, when I change cells in
DailySums I would like MasterSum to reflect those changes immeditly after
entry. I don't even mind having a Macro Button to press to update
MasterSum.

Any help would be greatfully appreciated.

thomas