LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Determining text in a cell

I have built a form used by various people. I woull like to make sure they
input some valid form of data into the cell. Upon execution of the macro, I
would like to check the cell for length of characters or somthing like that.
I have tried to use the somthing like:

Dim EHS as String
Dim MyLen as Integer
range("A1").select
EHS = Selection
MyLen = Len(EHS)

If Mylen <2 then
Some type of message or input box....

When I try this I get a Runtime error 13.

Any suggestions?

ZABU


 
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
Determining the Cell Address of a VLOOKUP Result in VBA [email protected] Excel Discussion (Misc queries) 3 April 9th 23 12:45 PM
determining the largest value in a sequence of text strings Dave F[_2_] Excel Discussion (Misc queries) 6 January 31st 09 02:33 PM
Determining the text mode from a variety of data types matt3542 Excel Worksheet Functions 17 July 31st 08 08:01 PM
Determining AM or PM in text string Bob Excel Worksheet Functions 8 October 27th 06 12:55 PM
Determining whether selected cell has value or formula? John Wirt Excel Programming 3 July 31st 03 04:19 AM


All times are GMT +1. The time now is 09:23 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"