View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips Bob Phillips is offline
external usenet poster
 
Posts: 1,726
Default How can I have a macro update the sheet?

Something like this

With ThisWorkbook.Worksheets("Master")
Set oWBData = Workbooks.Open("C:\Data\data.xls") '<=== change to
suit
oWBData.Worksheets(1).UsedRange.Copy .Range("B2")
oWBData.Close Savechanges:=False
End With

--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)

wrote in message
ups.com...
Hi all,
I am trying to create a macro that can update the entire sheet. I have
this data entry sheet and I also have a data.xls file that is converted
from a text file. This data.xls file changes every month. So, instead
of typing all those numbers every month into the data entry sheet,
which is a different workbook, I want to create such a macro that when
I run it, it should load all the numbers for the new month into the
data entry sheet.
I would be so happy if you guys help me out. Thanks