ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Cell contents in Excel?? (https://www.excelbanter.com/excel-programming/304053-cell-contents-excel.html)

A.K.

Cell contents in Excel??
 
Hi all,
I am developing an app with excel using VBA. I want to determine the type of
content of a cell ie, is it text, or numeric, or a formula, or a hyperlink.
How can I possibly do that?
Any methods, events, or functions to obtain this?
Please suggest.



Tom Ogilvy

Cell contents in Excel??
 
if ActiveCell.Hasformula then


if ActiveCell.Hyperlinks.count 0 then


if vartype(activeCell.Value)

see help on vartype for the values returned.

--
Regards,
Tom Ogilvy


"A.K." wrote in message
...
Hi all,
I am developing an app with excel using VBA. I want to determine the type

of
content of a cell ie, is it text, or numeric, or a formula, or a

hyperlink.
How can I possibly do that?
Any methods, events, or functions to obtain this?
Please suggest.






All times are GMT +1. The time now is 05:26 PM.

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