How can I have a macro update the sheet?

S

serozkan

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
 
B

Bob Phillips

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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top