Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Working with VBA classes via WSH possible?

I have created a few VBA objects ("classes") in a workbook. Now i would like
to use them in a WSH script without opening the workbook as well as calling
a workbook macro. Is it possible?

Could not find any information on that on the web so far. I've tried to
create the object via GetObject on exported .cls-file, but this does not
work. Do i maybe have to recompile it in VB6 instead or the like?

Thanks in advance,
Stefan Bialucha.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Working with VBA classes via WSH possible?

Ok, i have to refine the question to two cases:
1) The VBA object does not interact with Excel at all, let's say it just
acts as a file interface.
2) The VBA object does interact with Excel, let's say it calls workbook
macros or uses sheets for data handling.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Working with VBA classes via WSH possible?

Nothing to do with code would be accessible from a closed workbook.

Classes can only be used in the workbook in which they are defined to the
best of my knowledge, so if you wanted to make some type of library, then
you would probably do as you suggest, make them into a DLL or something in
VB6. That assumes that they just use generic VB6 objects, properties and
methods and nothing from Excel. An exported file is a simple text file.

--
Regards,
Tom Ogilvy

"Stefan Bialucha" wrote in message
...
I have created a few VBA objects ("classes") in a workbook. Now i would

like
to use them in a WSH script without opening the workbook as well as

calling
a workbook macro. Is it possible?

Could not find any information on that on the web so far. I've tried to
create the object via GetObject on exported .cls-file, but this does not
work. Do i maybe have to recompile it in VB6 instead or the like?

Thanks in advance,
Stefan Bialucha.




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
Excel Classes alish Excel Discussion (Misc queries) 3 October 30th 07 01:03 PM
data classes Huidekoper Excel Discussion (Misc queries) 1 April 21st 06 04:22 PM
Counting Classes MillerK Excel Discussion (Misc queries) 0 March 10th 06 03:32 PM
object classes mark Excel Programming 10 July 1st 04 03:42 PM
Using classes defined in an add-in Lieven Mettepenningen[_2_] Excel Programming 1 January 8th 04 03:01 PM


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