Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 857
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
copy another file worksheet into shared workbood apermes Excel Discussion (Misc queries) 1 March 14th 10 11:21 PM
Excel Updateing Information JohnM New Users to Excel 4 August 4th 07 01:28 PM
Updateing worksheets when openening workbook a94andwi Excel Programming 1 July 4th 05 03:56 PM
Updateing formulas Dawn S Excel Worksheet Functions 0 May 24th 05 09:41 PM
Pivot Not Updateing Steve Excel Worksheet Functions 6 December 10th 04 07:00 PM


All times are GMT +1. The time now is 04:16 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"