Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Getting values from a closed file

Hi, I'm designing a userform with a drop down list. Based
on the value the user chooses, I need to get values out of
several cells in a closed workbook and populate them into
another workbook. How can this be done? I was told you
cannot get any information out of a closed workbook using
VB.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Getting values from a closed file

The easiest is to open the workbook and grab the values, then close it.

Second easiest is to build a linking formula in a cell, grab the returned
value, clear the cell

Range("A1").Formula = "=C:\Myfolder[mybook.xls]Sheet1!B9"
vVal = Range("A1").Value
Range("A1").Clear


--
Regards,
Tom Ogilvy


"Shelley" wrote in message
...
Hi, I'm designing a userform with a drop down list. Based
on the value the user chooses, I need to get values out of
several cells in a closed workbook and populate them into
another workbook. How can this be done? I was told you
cannot get any information out of a closed workbook using
VB.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Getting values from a closed file

Hi Tom, do I actually code the "[" and "]"?
Thanks
-----Original Message-----
The easiest is to open the workbook and grab the values,

then close it.

Second easiest is to build a linking formula in a cell,

grab the returned
value, clear the cell

Range("A1").Formula = "=C:\Myfolder[mybook.xls]Sheet1!B9"
vVal = Range("A1").Value
Range("A1").Clear


--
Regards,
Tom Ogilvy


"Shelley" wrote in

message
...
Hi, I'm designing a userform with a drop down list.

Based
on the value the user chooses, I need to get values out

of
several cells in a closed workbook and populate them

into
another workbook. How can this be done? I was told you
cannot get any information out of a closed workbook

using
VB.



.

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
coppied Graph changes values when original is closed Keith H[_2_] Charts and Charting in Excel 0 February 9th 09 12:37 PM
Reading values from a closed workbook Graham F New Users to Excel 6 July 28th 08 03:32 PM
How can I add values to a closed excel file? Ali Excel Worksheet Functions 8 June 11th 05 01:13 AM
Excel is not asking to save a changed file when the file is closed Ron Excel Discussion (Misc queries) 2 March 14th 05 01:05 AM


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