Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Need to register a UDF (xlfRegister) that takes no param

Hi,

I'm registering a UDF function in Excel via Excel4(xlfRegister, ...).

I want to register a simple fonction that just returns a string value
(no need to pass parameters to the function)

The problem is that the function paste dialog always ask for one
arguments.

I'm using "R#!" and I give an empty string for args names.

Any help would be greatly appreciated!

Thanks a lot,

Nicolas

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,440
Default Need to register a UDF (xlfRegister) that takes no param

Hi Nicolas,

What is the code of your function and with what formula do you call it?

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

wrote in message oups.com...
| Hi,
|
| I'm registering a UDF function in Excel via Excel4(xlfRegister, ...).
|
| I want to register a simple fonction that just returns a string value
| (no need to pass parameters to the function)
|
| The problem is that the function paste dialog always ask for one
| arguments.
|
| I'm using "R#!" and I give an empty string for args names.
|
| Any help would be greatly appreciated!
|
| Thanks a lot,
|
| Nicolas
|


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Need to register a UDF (xlfRegister) that takes no param

Hi,

The function prototype is :

XLOPER* VssGetTriggerTime()
{
// ... (code that just puts a simple string in the returning
XLOPER*) ...
}

I'm registering it with Excel4(xlfRegister, ... )

int err = Excel4(xlfRegister, 0, 10,
&xlDllName, // Full drive, path
and filename of the DLL
&xlInternalName, // "VssGetTriggerTime"
&xlFctPrototype, // "R#!"
&xlInternalName, // "VssGetTriggerTime"
&xlArgNames, // ""
&xlFctType, // 1 (function)
&xlFctCategory, // ""
&xlEmpty, // "" (Not Used)
&xlEmpty, // "" (no help topic)
&xlFctDescription); // "Get a simple string"

My function appear in the paste dialog.
I can select it, but the function dialog ask me for an argument.

If I write noting, the function is returning the test string.
If I write something, the function is returning #VALUE.

Why ...?

I hope this will help you!

Regards,

Nicolas

On May 23, 12:09 pm, "Niek Otten" wrote:
Hi Nicolas,

What is the code of your function and with what formula do you call it?

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

wrote in ooglegroups.com...

| Hi,
|
| I'm registering a UDF function in Excel via Excel4(xlfRegister, ...).
|
| I want to register a simple fonction that just returns a string value
| (no need to pass parameters to the function)
|
| The problem is that the function paste dialog always ask for one
| arguments.
|
| I'm using "R#!" and I give an empty string for args names.
|
| Any help would be greatly appreciated!
|
| Thanks a lot,
|
| Nicolas
|



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
Output param from SQL Andre[_5_] Excel Programming 1 July 17th 06 06:33 AM
open a spreadsheet with param ITDUDE27 Excel Discussion (Misc queries) 1 April 19th 06 07:55 AM
build param string for WHERE IN (....) [email protected] Excel Programming 3 October 7th 05 04:12 PM
Haeder/Footer param Erik Creyghton Excel Programming 4 July 27th 04 08:58 PM
CorruptLoad param of Workbooks.Open Microsoft Excel Programming 6 April 17th 04 10:50 PM


All times are GMT +1. The time now is 07:37 PM.

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"