ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Writing a DLL using Visual Studio 6 to return cell address! (https://www.excelbanter.com/excel-programming/303210-writing-dll-using-visual-studio-6-return-cell-address.html)

agarwaldvk

Writing a DLL using Visual Studio 6 to return cell address!
 
I am trying to write an Excel DLL for a function using Visual Studio
in C/Visual C++ that can be called from a worksheet cell.

This function would do something very similar to the built-in VLOOKU
function except that, the user can specify which occurrance of the loo
up value to find rather than always the first - as is the case with th
built-in lookup functions. Further, the user would also be able t
specify the column number where the lookup should be searched rathe
than this always being the first. I don't want to do this using VB
Excel - it is very slow that way particularly when the search array i
big.

In essence, I am looking for some help to be able to do to pass a
Excel range or a VBA (Excel) array to the DLL function and to be abl
to return the cell from the dll function . Whilst I know how to retur
the address from C, I don't know how to translate that memory addres
to Excel cell addresses.


Deepak Agarwa

--
Message posted from http://www.ExcelForum.com


Rob van Gelder[_4_]

Writing a DLL using Visual Studio 6 to return cell address!
 
This MSKB article has some good info for creating DLL worksheet functions:
http://support.microsoft.com/default.aspx?kbid=285337


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


"agarwaldvk " wrote in message
...
I am trying to write an Excel DLL for a function using Visual Studio 6
in C/Visual C++ that can be called from a worksheet cell.

This function would do something very similar to the built-in VLOOKUP
function except that, the user can specify which occurrance of the look
up value to find rather than always the first - as is the case with the
built-in lookup functions. Further, the user would also be able to
specify the column number where the lookup should be searched rather
than this always being the first. I don't want to do this using VBA
Excel - it is very slow that way particularly when the search array is
big.

In essence, I am looking for some help to be able to do to pass an
Excel range or a VBA (Excel) array to the DLL function and to be able
to return the cell from the dll function . Whilst I know how to return
the address from C, I don't know how to translate that memory address
to Excel cell addresses.


Deepak Agarwal


---
Message posted from http://www.ExcelForum.com/




agarwaldvk[_2_]

Writing a DLL using Visual Studio 6 to return cell address!
 
Ron

Whilst your response is good, it is only applicable to Excel 2002 an
above. I, at present have access to Excel 97/2000 at work. Hence,
would need assistance in writing DLL's for Excel funcitons using Visua
C++ via VS6. Can you help?

Deepa

--
Message posted from http://www.ExcelForum.com


Rob van Gelder[_4_]

Writing a DLL using Visual Studio 6 to return cell address!
 
William Hooper has some good info on creating XLL

http://www.whooper.co.uk/excelstuff.htm


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


"agarwaldvk " wrote in message
...
Ron

Whilst your response is good, it is only applicable to Excel 2002 and
above. I, at present have access to Excel 97/2000 at work. Hence, I
would need assistance in writing DLL's for Excel funcitons using Visual
C++ via VS6. Can you help?

Deepak


---
Message posted from http://www.ExcelForum.com/





All times are GMT +1. The time now is 01:34 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com