ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   If activecell is not text (https://www.excelbanter.com/excel-programming/351659-if-activecell-not-text.html)

John

If activecell is not text
 
How can I pull up a message box if the active cell is not formated as text?
IF activecell.format < text then... ???
Thanks!

Gary''s Student

If activecell is not text
 
Sub Macro1()
Dim r As Range
Set r = Selection
If Not (Application.IsText(r)) Then
MsgBox ("selection is not text")
End If
End Sub
--
Gary's Student


"John" wrote:

How can I pull up a message box if the active cell is not formated as text?
IF activecell.format < text then... ???
Thanks!



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

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