Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello. I'm using Excel XP. I don't know what's causing the error message
for following code: If Application.IsText(ActiveCell.Value) Then sText = ActiveCell.Value Else sNonText = ActiveCell.Value EndIf I get an "Object Required" error message. Any thoughts?? I've tried the following as well: If Application.IsText(ActiveCell.Value) = True then ....etc I don't get it. This code is all over the web as an example of how to use "IsText" in VBA. Do I need a special DIM statement, or reference?? Thanks. -- Craig |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Craig,
I would have said that you are missing the "WorksheetFunction" between "Application" and "IsText" (as IsText is part of Excel, not VBA), but Application.IsText works. You sure the error is occurring on that line ? NickHK "Craig" wrote in message ... Hello. I'm using Excel XP. I don't know what's causing the error message for following code: If Application.IsText(ActiveCell.Value) Then sText = ActiveCell.Value Else sNonText = ActiveCell.Value EndIf I get an "Object Required" error message. Any thoughts?? I've tried the following as well: If Application.IsText(ActiveCell.Value) = True then ...etc I don't get it. This code is all over the web as an example of how to use "IsText" in VBA. Do I need a special DIM statement, or reference?? Thanks. -- Craig |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Yes...and I don't understand why it's happening. I even tried your
"Worksheetfunction" example, and it doesn't work. -- Craig "NickHK" wrote: Craig, I would have said that you are missing the "WorksheetFunction" between "Application" and "IsText" (as IsText is part of Excel, not VBA), but Application.IsText works. You sure the error is occurring on that line ? NickHK "Craig" wrote in message ... Hello. I'm using Excel XP. I don't know what's causing the error message for following code: If Application.IsText(ActiveCell.Value) Then sText = ActiveCell.Value Else sNonText = ActiveCell.Value EndIf I get an "Object Required" error message. Any thoughts?? I've tried the following as well: If Application.IsText(ActiveCell.Value) = True then ...etc I don't get it. This code is all over the web as an example of how to use "IsText" in VBA. Do I need a special DIM statement, or reference?? Thanks. -- Craig |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
If + ISTEXT + SEARCH | Excel Discussion (Misc queries) | |||
How do I use istext with a sum formula? | New Users to Excel | |||
Sumproduct and ISTEXT? | Excel Worksheet Functions | |||
IF-ISTEXT formula | Excel Discussion (Misc queries) | |||
ISTEXT | Excel Discussion (Misc queries) |