I'm trying to use the following line of code but it does not work.Does anyone have any ideas as to why this is..VB Code:
result = application.worksheetfunction.char(number1)
Printable View
I'm trying to use the following line of code but it does not work.Does anyone have any ideas as to why this is..VB Code:
result = application.worksheetfunction.char(number1)
char is not a member of WorksheetFunction
Pieter
There is Chr which is what I think you want.
Chr: Returns a String containing the character associated with the specified character code.
I don't know what you are trying to do, but here are a couple of examples of WORKSHEET FUNCTIONS (Excel 2003):
CODE("A") returns the integer 65
CHAR(65) returns the character "A"
The equivalent direct VBA functions are:
Asc("A") returns the integer 65
Chr(65) returns the character "A"
Thanks guys you solved my problem. I just don't know why they have to change the name of a function between when it is use in the worksheet or used in VBA.
Thanks.