• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 179
  • Last Modified:

How to read a variable from an opened excel workbook

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
mgroyal
Asked:
mgroyal
1 Solution
 
_agj_Commented:
to get access to an application/workbook already open, do

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

use  obj and proceed.
0

Featured Post

[Webinar] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now