Glenn,

Could you shine some light on the usage of your xlRangeFormat UDF? I dl-ed the Excel library from your site but I'm having some trouble with one of the UDF’s.

I'm creating an Excel sheet that has one column that contains phone numbers. All phone numbers start with a 0 for us but excel removes it because basically 0111 is the same as 111. True if it was a number to do some math with but not true in this case. I need the leading 0.
My solution was to use your UDF to set the format to text so Excel leaves the leading 0 alone but all I get is an error on line 34 of the UDF telling me that the required 3rd parameter is missing. The example in the UDF header shows an example from an other Excel UDF so that is of no use right now.

Could you let me in on the secrets of xlRangeFormat? Is it possible to set several cells to text format by using "A1:Z100" as a range? If so, how?

 Code:
....
$rc = xlRangeFormat($xlPtr, 'A2', "Text", 'Sheet1')
....



Oh and BTW I really love the Excel library
Started exploring it today and already got some projects that could use (parts of) it to eliminate some steps and speed things up.

[edit]
Changed the title.
[/edit]


Edited by Mart (2008-04-20 11:25 PM)
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.