Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default automation object type library reference

I am having trouble guessing the data type of some of the
automation functions. I am controlling Excel from a C++
app using excel.exe to create wrapper classes for
Application, Workbooks etc.

example: in C++ the Sheets.SaveAs code reguires before,
after, count, etc as arguments. I know what they all mean
from the VBA object model help; but are they shorts, longs
etc to cast the colevariant you have to use??

Does anyone know where I can get hold of an online
reference so I can look these things up quickly???

Regards,
Kevan
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default automation object type library reference

the help file in Excel VBA shows all the arguments to be variant.

--
Regards,
Tom Ogilvy

"Kevan Hanson" wrote in message
...
I am having trouble guessing the data type of some of the
automation functions. I am controlling Excel from a C++
app using excel.exe to create wrapper classes for
Application, Workbooks etc.

example: in C++ the Sheets.SaveAs code reguires before,
after, count, etc as arguments. I know what they all mean
from the VBA object model help; but are they shorts, longs
etc to cast the colevariant you have to use??

Does anyone know where I can get hold of an online
reference so I can look these things up quickly???

Regards,
Kevan



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default automation object type library reference

In VBA thats the case, however in c++ if you initialize an
application object as "oExcel" for example, then the
following code references a WorkBook (provided oBook and
oBooks have been initialized).

oBook = oBooks.get_Item(COleVariant((short)1));

whereas

oBook = oBooks.get_Item(COleVariant((double)1));



fails, (obvious: but some are not; I was in a hurry) what
I am trying to find is a reference that indicates what
data type each argument is supposed to be. I know one
exists because I have seen it before, but not needed it
until now.

thanks for the reply.

Regards,
Kevan




-----Original Message-----
the help file in Excel VBA shows all the arguments to be

variant.

--
Regards,
Tom Ogilvy

"Kevan Hanson" wrote in message
...
I am having trouble guessing the data type of some of

the
automation functions. I am controlling Excel from a C++
app using excel.exe to create wrapper classes for
Application, Workbooks etc.

example: in C++ the Sheets.SaveAs code reguires before,
after, count, etc as arguments. I know what they all

mean
from the VBA object model help; but are they shorts,

longs
etc to cast the colevariant you have to use??

Does anyone know where I can get hold of an online
reference so I can look these things up quickly???

Regards,
Kevan



.

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 2007 compatability, VBA Reference, MicrosoftOffice12. Object Library [email protected] Excel Discussion (Misc queries) 3 May 1st 07 06:57 PM
Setting a reference to an object library - do our customers have to do it too ? Charles Jordan Excel Programming 2 May 18th 04 05:26 AM
VBA References - when is Office Object Library Reference set? Best practice re. Early/Late binding ... AndyB Excel Programming 5 April 22nd 04 02:11 PM
Object Library 11.0 GP Excel Programming 1 February 25th 04 01:12 PM
Excel Object Library Reference francis cheuk Excel Programming 1 February 11th 04 06:15 PM


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