Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / January 2008

Tip: Looking for answers? Try searching our database.

Alphanumeric Recognition

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
NewToVB - 25 Jan 2008 16:08 GMT
I'm using Visual Studio/Visual Basic which is very similiar to VBA.  I need
for my program to recognize when a cell has 8 alphanumeric characters in
column A, and if it doesn't have 8 alphanumeric characters to delete the
entire row.  Any ideas on how to do this?  Thanks in advance! :)
Rick Rothstein (MVP - VB) - 25 Jan 2008 16:32 GMT
You haven't told us much or given us code where we create a solution for you
using your own variable names; so I'll make the assumption that you already
know how to delete a row and are just not sure how to insure your cell's
content is exactly 8 alphanumeric characters.

If Not Text Like Replace(String(8, "Z"), "Z", "[a-zA-Z0-9]") Then
   '  Text is **not** made up of 8 alphanumeric characters...
   '  so put your delete row line here
End If

Rick

> I'm using Visual Studio/Visual Basic which is very similiar to VBA.  I
> need
> for my program to recognize when a cell has 8 alphanumeric characters in
> column A, and if it doesn't have 8 alphanumeric characters to delete the
> entire row.  Any ideas on how to do this?  Thanks in advance! :)
NewToVB - 25 Jan 2008 16:39 GMT
Yes I already know how to delete rows and all, just wasn't sure about the
alphanumeric part, sorry about that.  I'll try this thank you! :)

> You haven't told us much or given us code where we create a solution for you
> using your own variable names; so I'll make the assumption that you already
[quoted text clipped - 13 lines]
> > column A, and if it doesn't have 8 alphanumeric characters to delete the
> > entire row.  Any ideas on how to do this?  Thanks in advance! :)
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.