Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
um um is offline
external usenet poster
 
Posts: 12
Default Excel 2000 calling functions in C++

Hello,

I am looking for a way to call a function from within Excel, like

@myfunc(B1:D10, E1)

which executes a C++-based function (potentially dll or COM) which passes
the cell range i.e B1:D10, as well as the location where to store the result
of myfunc, i.e. E1. Subsequently the myfunc in the dll does it's math magic
and passes the result back to the spreadsheet into cell E1.

This can't be too difficult, except all the samples I see are VBA based. I
also downloaded the COMAddin sample which is C++-based, but I can't seem to
get the pointer to a range of cells which I marked prior to clicking the
MyCommandBar button in the spreadsheet.

I have spent a lot of time in searches and I am getting frustrated about
this.

Does anyone have a good pointer to a sample or a sample which I could
dissect and use as a basis to start my project from? No VBA please!!!

Thank you much in advance!

um


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,236
Default Excel 2000 calling functions in C++

Take a look at: support.microsoft.com/support/ kb/articles/Q152/1/52.asp


--
Rob van Gelder - http://www.vangelder.co.nz/excel


"um" wrote in message
...
Hello,

I am looking for a way to call a function from within Excel, like

@myfunc(B1:D10, E1)

which executes a C++-based function (potentially dll or COM) which passes
the cell range i.e B1:D10, as well as the location where to store the

result
of myfunc, i.e. E1. Subsequently the myfunc in the dll does it's math

magic
and passes the result back to the spreadsheet into cell E1.

This can't be too difficult, except all the samples I see are VBA based. I
also downloaded the COMAddin sample which is C++-based, but I can't seem

to
get the pointer to a range of cells which I marked prior to clicking the
MyCommandBar button in the spreadsheet.

I have spent a lot of time in searches and I am getting frustrated about
this.

Does anyone have a good pointer to a sample or a sample which I could
dissect and use as a basis to start my project from? No VBA please!!!

Thank you much in advance!

um




  #3   Report Post  
Posted to microsoft.public.excel.programming
um um is offline
external usenet poster
 
Posts: 12
Default Excel 2000 calling functions in C++

Thank you Rob,

there seems to be a problem with the url you posted... "Q152/1/52.asp"
sounds wrong for a KB article ..??

Can you point me to the correct one?

Thanks again,

um


"Rob van Gelder" wrote in message
...
Take a look at: support.microsoft.com/support/ kb/articles/Q152/1/52.asp


--
Rob van Gelder - http://www.vangelder.co.nz/excel


"um" wrote in message
...
Hello,

I am looking for a way to call a function from within Excel, like

@myfunc(B1:D10, E1)

which executes a C++-based function (potentially dll or COM) which

passes
the cell range i.e B1:D10, as well as the location where to store the

result
of myfunc, i.e. E1. Subsequently the myfunc in the dll does it's math

magic
and passes the result back to the spreadsheet into cell E1.

This can't be too difficult, except all the samples I see are VBA based.

I
also downloaded the COMAddin sample which is C++-based, but I can't seem

to
get the pointer to a range of cells which I marked prior to clicking the
MyCommandBar button in the spreadsheet.

I have spent a lot of time in searches and I am getting frustrated about
this.

Does anyone have a good pointer to a sample or a sample which I could
dissect and use as a basis to start my project from? No VBA please!!!

Thank you much in advance!

um






  #4   Report Post  
Posted to microsoft.public.excel.programming
um um is offline
external usenet poster
 
Posts: 12
Default Excel 2000 calling functions in C++

Ok Rob,

it's article Q152152, found it.

Thanks again!

um


"um" wrote in message
...
Thank you Rob,

there seems to be a problem with the url you posted... "Q152/1/52.asp"
sounds wrong for a KB article ..??

Can you point me to the correct one?

Thanks again,

um


"Rob van Gelder" wrote in message
...
Take a look at: support.microsoft.com/support/ kb/articles/Q152/1/52.asp


--
Rob van Gelder - http://www.vangelder.co.nz/excel


"um" wrote in message
...
Hello,

I am looking for a way to call a function from within Excel, like

@myfunc(B1:D10, E1)

which executes a C++-based function (potentially dll or COM) which

passes
the cell range i.e B1:D10, as well as the location where to store the

result
of myfunc, i.e. E1. Subsequently the myfunc in the dll does it's math

magic
and passes the result back to the spreadsheet into cell E1.

This can't be too difficult, except all the samples I see are VBA

based.
I
also downloaded the COMAddin sample which is C++-based, but I can't

seem
to
get the pointer to a range of cells which I marked prior to clicking

the
MyCommandBar button in the spreadsheet.

I have spent a lot of time in searches and I am getting frustrated

about
this.

Does anyone have a good pointer to a sample or a sample which I could
dissect and use as a basis to start my project from? No VBA please!!!

Thank you much in advance!

um








  #5   Report Post  
Posted to microsoft.public.excel.programming
um um is offline
external usenet poster
 
Posts: 12
Default Excel 2000 calling functions in C++

Rob,

do you have anything else in terms of samples? When I compile the one from
Q152152, it will only get recognized by Excel, if I compile to Release of
VC6.0. The Debug version does not get recognized, and either Debug or
Release of VC7.0 do not get recognized either. Kinda hard to do, if you
can't use Debug code..

Thanks a mille,

Uwe



"um" wrote in message
...
Ok Rob,

it's article Q152152, found it.

Thanks again!

um


"um" wrote in message
...
Thank you Rob,

there seems to be a problem with the url you posted... "Q152/1/52.asp"
sounds wrong for a KB article ..??

Can you point me to the correct one?

Thanks again,

um


"Rob van Gelder" wrote in

message
...
Take a look at: support.microsoft.com/support/

kb/articles/Q152/1/52.asp


--
Rob van Gelder - http://www.vangelder.co.nz/excel


"um" wrote in message
...
Hello,

I am looking for a way to call a function from within Excel, like

@myfunc(B1:D10, E1)

which executes a C++-based function (potentially dll or COM) which

passes
the cell range i.e B1:D10, as well as the location where to store

the
result
of myfunc, i.e. E1. Subsequently the myfunc in the dll does it's

math
magic
and passes the result back to the spreadsheet into cell E1.

This can't be too difficult, except all the samples I see are VBA

based.
I
also downloaded the COMAddin sample which is C++-based, but I can't

seem
to
get the pointer to a range of cells which I marked prior to clicking

the
MyCommandBar button in the spreadsheet.

I have spent a lot of time in searches and I am getting frustrated

about
this.

Does anyone have a good pointer to a sample or a sample which I

could
dissect and use as a basis to start my project from? No VBA

please!!!

Thank you much in advance!

um












  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 811
Default Excel 2000 calling functions in C++

Hi Uwe,

<<When I compile the one from Q152152, it will only get recognized by Excel,
if I compile to Release of VC6.0. The Debug version does not get
recognized

Under the Project/Settings/C/C++ menu make sure that the Debug Info
setting is Program Database and not Program Database for Edit and Continue.
The latter setting adds tokens to the debug code that cause Excel not to
recognize it.

<<and either Debug or Release of VC7.0 do not get recognized either

Same as above for the debug version, except the menu is Project/<Project
Name Properties/C/C++/General. Also make sure that the .def file has been
properly associated with the project. Under the menu Project/<Project Name
Properties/Linker/Input the .def file should be listed in the Module
Definition File setting.

--
Rob Bovey, MCSE, MCSD, Excel MVP
Application Professionals
http://www.appspro.com/

* Please post all replies to this newsgroup *
* I delete all unsolicited e-mail responses *


"um" wrote in message
.. .
Rob,

do you have anything else in terms of samples? When I compile the one from
Q152152, it will only get recognized by Excel, if I compile to Release of
VC6.0. The Debug version does not get recognized, and either Debug or
Release of VC7.0 do not get recognized either. Kinda hard to do, if you
can't use Debug code..

Thanks a mille,

Uwe





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
calling a C++ program from Excel 2000 and passing a result from C++ back to an excel spreadsheet ellis kurland Excel Discussion (Misc queries) 3 August 15th 05 04:10 PM
calling a stored procedure on MS SQL Server within MS Excel 2000 Witold Domienik Excel Programming 0 March 2nd 04 10:47 AM
Calling Excel array functions in VBA JM[_4_] Excel Programming 7 March 2nd 04 03:23 AM
Calling functions from Excel worksheets and the Find function in XL '97 Mike-hime Excel Programming 1 January 8th 04 03:17 AM
Calling certain functions within VBA james Excel Programming 0 August 11th 03 10:27 PM


All times are GMT +1. The time now is 12:09 PM.

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"