Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Updateing a workbook from another workbood
I need to open a workbook, update a worksheet, and close the workbook all
from a different workbook. I have tried several approaches and have not been successful. Can someon please point me to an article or source code to accomplishe this? Many Thanks, -- Robert Hill |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Updateing a workbook from another workbood
Robert,
The code below will open a workbook, put "Hello, World" in cell A1 of Sheet1, then save and close the workbook. Sub test() Dim wb As Workbook Set wb = Application.Workbooks.Open("D:\test.xls") wb.Worksheets("Sheet1").Range("A1").Value = "Hello, World" wb.Close True Set wb = Nothing End Sub -- Hope that helps. Vergel Adriano "Robert" wrote: I need to open a workbook, update a worksheet, and close the workbook all from a different workbook. I have tried several approaches and have not been successful. Can someon please point me to an article or source code to accomplishe this? Many Thanks, -- Robert Hill |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
copy another file worksheet into shared workbood | Excel Discussion (Misc queries) | |||
Excel Updateing Information | New Users to Excel | |||
Updateing worksheets when openening workbook | Excel Programming | |||
Updateing formulas | Excel Worksheet Functions | |||
Pivot Not Updateing | Excel Worksheet Functions |