LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Open multiple spreadsheets and pull data

I'm writing an update routine that keeps 2 EXCEL 2010 spreadsheets in-sync.
I'm using this code to open the first spreadsheet and read data into variable:

Workbooks.Open ("\\server\share\Spreadsheet1.xlsx")
set rgePROGRESS = Worksheets("xxxx").Range("A2:C341")

(code works fine)

Then I read local (or try to read) spreadsheet:

Dim AddressSheet As Worksheet
Set AddressSheet = Worksheets("Dups")
FinalRow = AddressSheet.Cells(65536, 2).End(xlUp).Row
Set rgeDUPS = Worksheets("Dups").Range("A2:I" & FinalRow)

(code works fine)

The following code fails by trying to write into a worksheet called "Dups"
on the network spreadsheet:

For i = 1 To rgeDUPS.Rows.Count
wellno = rgeDUPS.Cells(i, 3).Value

For k = 1 To rgePROGRESS.Rows.Count
If rgePROGRESS.Cells(k, 1).Value = wellno Then
Worksheets("Dups").Cells(i, 8).Value = rgePROGRESS.Cells(k,
3).Value
End If
Next k

Next i



Thanks for any help . . .
 
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
how to open multiple spreadsheets BushyIII Excel Discussion (Misc queries) 2 August 4th 07 06:32 PM
Open multiple spreadsheets JR Hester Excel Discussion (Misc queries) 1 April 3rd 07 10:12 PM
Open multiple spreadsheets, but close only one Cheri Excel Discussion (Misc queries) 1 February 2nd 06 01:08 AM
How do I pull information from multiple existing spreadsheets int. JJohn Excel Discussion (Misc queries) 4 March 1st 05 04:56 PM
open multiple excel spreadsheets in separate windows by default Joe E via OfficeKB.com Setting up and Configuration of Excel 4 February 10th 05 06:33 PM


All times are GMT +1. The time now is 06:44 PM.

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"