View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.programming
Dave Patrick Dave Patrick is offline
external usenet poster
 
Posts: 249
Default Word VBA link to Excel

Glad to hear it worked for you.

--

Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

"Borg" wrote:
|
| Thank you sir,
|
| With your help, I played around with your VBA code and got it to do
| what I intended.
|
| Here is what I modified it to:
|
| Sub test()
| Dim filePath, oExcel, oSheet
| filePath = "C:\Documents and Settings\User\My Documents\Book1.xls"
| Set oExcel = CreateObject("Excel.Application")
| oExcel.Workbooks.Open (filePath)
| Set oSheet = oExcel.ActiveWorkbook.Worksheets(1)
| Selection = oSheet.Cells(1, 1)
| Selection.Copy
| Selection.Paste
| oExcel.DisplayAlerts = False
| oExcel.ActiveWorkbook.Close
| oExcel.Quit
| Set oSheet = Nothing
| Set oExcel = Nothing
|
| End Sub
|
|
| --
| Borg
| ------------------------------------------------------------------------
| Borg's Profile:
http://www.excelforum.com/member.php...o&userid=36396
| View this thread: http://www.excelforum.com/showthread...hreadid=561797
|