Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How to use function CELL(Infotyp;Ref) in VBA?

Hi.

I try to use the worksheet function CELL(Infotyp;Ref) in VBA to abtain the
format info of a cell. But in VBA I can't find this function (it is not
included in the Application.WorksheetFunction object!)

How can I use CELL(..) in VBA?

Is there any other way to obatin the format info that is given by
CELL("Format", ...), i.e. "S" for standard, "F2" for "0,00", "P0" for "0%"
and so on...)?

Thanks in advance,
Stefan Jauch
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default How to use function CELL(Infotyp;Ref) in VBA?

Not all worksheetfunctions are available in VBA. This appears to be one of
them.

Nothing else produces those categorizations. You can use
sFormat = ActiveCell.Numberformat

then parse the results to make your own determination.

--
Regards,
Tom Ogilvy

"Stefan Jauch" <Stefan wrote in message
...
Hi.

I try to use the worksheet function CELL(Infotyp;Ref) in VBA to abtain the
format info of a cell. But in VBA I can't find this function (it is not
included in the Application.WorksheetFunction object!)

How can I use CELL(..) in VBA?

Is there any other way to obatin the format info that is given by
CELL("Format", ...), i.e. "S" for standard, "F2" for "0,00", "P0" for "0%"
and so on...)?

Thanks in advance,
Stefan Jauch



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default How to use function CELL(Infotyp;Ref) in VBA?

Stefan,
Not sure if this is the reason, the Help states:
<quote
Remarks
The CELL function is provided for compatibility with other spreadsheet
programs.
</quote
May be this means that it's not part of the object model.

NickHK

"Stefan Jauch" <Stefan wrote in message
...
Hi.

I try to use the worksheet function CELL(Infotyp;Ref) in VBA to abtain the
format info of a cell. But in VBA I can't find this function (it is not
included in the Application.WorksheetFunction object!)

How can I use CELL(..) in VBA?

Is there any other way to obatin the format info that is given by
CELL("Format", ...), i.e. "S" for standard, "F2" for "0,00", "P0" for "0%"
and so on...)?

Thanks in advance,
Stefan Jauch



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
ISBLANK function not working when cell is blank dut to function re mcmilja Excel Discussion (Misc queries) 9 May 7th 23 03:43 AM
Copy Excel Function from a Cell Through a Function Sheikh Saadi Excel Worksheet Functions 0 October 15th 09 04:22 PM
I want result of a function in the cell and not the function itsel Rana Excel Worksheet Functions 4 July 2nd 07 06:20 AM
Can function in one cell change value or function in another cell? me Excel Worksheet Functions 4 February 27th 06 01:04 PM
Hiding a function value in a cell until function used Paul Smithson Excel Worksheet Functions 1 February 25th 05 06:19 PM


All times are GMT +1. The time now is 02:36 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"