Attaching excel instance by excel vbo with macro
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
02-11-22 04:42 AM
I have an issue where i am trying to run macro on the workbook opened by excel but it instead is creating a new excel instance to run the macro on that.
------------------------------
Pooja Verma
------------------------------
------------------------------
Pooja Verma
------------------------------
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
02-11-22 07:16 AM
Hi Pooja,
Trying to understand what's going on: So your XL is already opened and your process has attached to it (by creating an instance) and when you access it the process creates a new instance?
The usual way to use an existing XL in a process is:
------------------------------
Happy coding!
---------------
Paul
Sweden
------------------------------
Trying to understand what's going on: So your XL is already opened and your process has attached to it (by creating an instance) and when you access it the process creates a new instance?
The usual way to use an existing XL in a process is:
- create an instance (you'll get a handle back)
- open the XL with the handle and path
- work with the XL (get data, write data)
- save (or save as) the XL
- close the XL
------------------------------
Happy coding!
---------------
Paul
Sweden
------------------------------
Happy coding!
Paul, Sweden
(By all means, do not mark this as the best answer!)
Paul, Sweden
(By all means, do not mark this as the best answer!)
