Solved

How to read a variable from an opened excel workbook

Posted on 2003-11-19
1
172 Views
Last Modified: 2010-05-03
Hi

I woud like to read a defined name (Variable) from an opened workbook. I know how to do this by creating a new workbook with 'CreateObject("excel.application")'. But this time the workbook is already open and I need to read a variable which is stored in a defined name. By the way it's not possible to open a 2nd instance because wouldn't have the variable I need.

Any suggestions?
Thx *mg
0
Comment
Question by:mgroyal
1 Comment
 
LVL 7

Accepted Solution

by:
_agj_ earned 100 total points
ID: 9777540
to get access to an application/workbook already open, do

set obj = GetObject(,"excel.application")

use  obj and proceed.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question