Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
How can I have a macro update the sheet?
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 |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
macro | Excel Discussion (Misc queries) | |||
Referring to the previous selected sheet in a macro | Excel Discussion (Misc queries) | |||
Macro to change data in a sheet | Excel Discussion (Misc queries) | |||
Finding and compiling list of cells containing data... | Excel Worksheet Functions | |||
Copying multiple sheets from one book 2 another and undertake spec | Excel Discussion (Misc queries) |