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

I have created a VB function that will pull numerical data from
specific cells in different spreadsheets and place the data in my main
status spreadsheet. Everything works fine, but I am getting data from
my status spreadsheet instead of the spreadsheets on the server.
Basically, I am pulling that data from the local source instead of the
remote sources. Below is the portion of my function that is not
working properly.

If Cells(TestCaseRow, 1) = "a" Then ColumnA = ColumnA +
Cells(TestCaseRow, 20)
If Cells(TestCaseRow, 1) = "b" Then ColumnB = ColumnB +
Cells(TestCaseRow, 20)
If Cells(TestCaseRow, 1) = "c" Then ColumnC = ColumnC +
Cells(TestCaseRow, 20)

I need to get the path to the remote spreadsheets into the statements
above. Any help will be greatly appreciated.

Don
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 179
Default Getting data from one spreadsheet to another

Don

When you use the Cells property unqualified, it's the same as using

ActiveSheet.Cells(...

You need to create an object variable that points to the sheet that you
want, then qualify all your Cells properties with that variable.

Dim sh As Worksheet

Set sh = Workbooks("Book1.xls").Worksheets(1)

If sh.Cells(TestCaseRow etc...

--
Dick Kusleika
MVP - Excel
www.dicks-clicks.com
Post all replies to the newsgroup.

"Don Fuller" wrote in message
om...
I have created a VB function that will pull numerical data from
specific cells in different spreadsheets and place the data in my main
status spreadsheet. Everything works fine, but I am getting data from
my status spreadsheet instead of the spreadsheets on the server.
Basically, I am pulling that data from the local source instead of the
remote sources. Below is the portion of my function that is not
working properly.

If Cells(TestCaseRow, 1) = "a" Then ColumnA = ColumnA +
Cells(TestCaseRow, 20)
If Cells(TestCaseRow, 1) = "b" Then ColumnB = ColumnB +
Cells(TestCaseRow, 20)
If Cells(TestCaseRow, 1) = "c" Then ColumnC = ColumnC +
Cells(TestCaseRow, 20)

I need to get the path to the remote spreadsheets into the statements
above. Any help will be greatly appreciated.

Don



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
Collate data from one spreadsheet into another spreadsheet Anthony Excel Worksheet Functions 2 October 19th 09 05:19 PM
Can I pull data from a spreadsheet to another spreadsheet Pat Excel Discussion (Misc queries) 2 March 18th 07 10:22 PM
How do I copy spreadsheet data as shown to another spreadsheet? trainer07 Excel Discussion (Misc queries) 2 August 7th 06 09:39 PM
summarize data from one spreadsheet to other spreadsheet sa02000 Excel Worksheet Functions 10 June 27th 06 07:10 PM
How to open another Excel spreadsheet to copy data into current spreadsheet ? Ricky Pang Excel Programming 0 July 13th 03 01:59 PM


All times are GMT +1. The time now is 11:54 AM.

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"