Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Referencing data from another workbook

WHoops - programming error on my part. I fixed my logic error and everythings
working fine, and would have been right from the start without my error.
Thanks.

"Ron de Bruin" wrote:

Hi Jim

I don't want to open the workbook

You do it in your code ?

Have you try the example code I posted ?

Show your complete code

If you want to open the workbooks see
http://www.rondebruin.nl/copy3.htm


--
Regards Ron de Bruin
http://www.rondebruin.nl



"Jim Burke in Novi" wrote in message
...
I used the following code:

Dim wkbk As Excel.Workbook
dim wksData As Excel.Worksheet

Set wkbk = Workbooks.Open(myFileName)
Set wksData = wkbk.Worksheets("DataSheet")
...other code that references the remote worksheet data...

As soon as the Open method is executed, it opens the workbook in Excel, and
the code that comes after it doesn't get executed. I tried using
Application.ScreenUpdating = false, but this had no effect. My code works
fine as long as I'm referncing a local worksheet. As soon as I do the above
to reference another workbook, the other workbook just opens up.


"Ron de Bruin" wrote:

Hi Jim

Do you want to create formula link

Use this then
='C:\Data\[ron.xls]Sheet1'!$A$1

If there are more workbooks you can use a macro
http://www.rondebruin.nl/summary2.htm

Or copy only the values
http://www.rondebruin.nl/copy7.htm

Or ADO
http://www.rondebruin.nl/ado.htm



--
Regards Ron de Bruin
http://www.rondebruin.nl



"Jim Burke in Novi" wrote in message
...
I need to reference cells from another workbook in VBA code. I don't want to
open the workbook, just reference the data from it. Any help is greatly
appreciated. Thanks.

Jim B






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
Data Validation Restriction Referencing other Workbook Jim Excel Worksheet Functions 1 September 9th 08 11:45 PM
Excel database query referencing data in the same workbook kpiq Excel Discussion (Misc queries) 1 September 3rd 08 08:43 PM
Data referencing and auto fill across worksheets in one workbook.. Corey Helms Excel Worksheet Functions 0 July 17th 06 03:44 PM
referencing workbook from cells in another workbook jlejehan[_3_] Excel Programming 2 May 3rd 06 03:24 PM
Referencing a different workbook. chris100[_63_] Excel Programming 1 April 14th 06 07:56 PM


All times are GMT +1. The time now is 05:58 AM.

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

About Us

"It's about Microsoft Excel"