LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
KR KR is offline
external usenet poster
 
Posts: 121
Default opening and referencing another workbook


I need to distribute copies of an Excel workbook to multiple users. On
occassion I may need to update source data for listboxes in their workbook,
so I created a "source data.xls" that I'm putting in a shared directory. I'm
currently trying to write code to check 3 values in their local copy against
"source data.xls", and if any are different, then copy the information from
the related page back to their local workbook to update their source
information.

I'm having some syntax issues when opening my source workbook, and wasn't
able to find anything on google, so here goes;
if you have any suggestions on what I need to do differently to open or
reference the source.xls I'd appreciate any input. Also, I may not be
looking under the right help topics, so I'd also welcome any keywords I
should be using if this information is in the help file somewhere.

Thanks,
Keith

Private Sub GetUpdatedData()
Dim SourceWB As Workbook

'On Error Resume Next
MyVPS = Sheet1.Range("G1").Value
MyVRsons = Sheet1.Range("G2").Value
MyVArds = Sheet1.Range("G3").Value

Set SourceWB = Workbooks.Open("\\Server05\workfiles\Source.xls", False,
True)

CheckVPS = SourceWB.Sheet1.Range("A1").Value 'errors out here
CheckVRsons = SourceWB.Sheet2.Range("A1").Value
CheckVArds = SourceWB.Sheet3.Range("A1").Value

'then use my code to compare them, and eventually to grab any updated data
and copy it over

--
The enclosed questions or comments are entirely mine and don't represent the
thoughts, views, or policy of my employer. Any errors or omissions are my
own.


 
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 do I stop blank workbook from opening when opening an existing kjg Excel Discussion (Misc queries) 3 February 12th 10 09:36 PM
when opening an Excel Workbook, another blank workbook also opens Gord Dibben Excel Discussion (Misc queries) 0 October 12th 07 09:49 PM
excel VBA problem - setting workbook as variable & opening/re-opening safe Excel Programming 1 August 20th 04 12:22 AM
How to make the opening of a workbook conditional upon the opening of another workbook Marcello do Guzman Excel Programming 1 December 16th 03 06:09 AM
How to make opening of workbook conditional of opening of another workbook turk5555[_2_] Excel Programming 2 December 15th 03 11:07 PM


All times are GMT +1. The time now is 12:59 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"