Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Newbie If question

 
Logged in as: Guest
arrSession:exec spGetSession 2,3,29475
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> ASP >> Newbie If question
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Newbie If question - 1/4/2006 1:33:53 AM   
  mcauliff

 

Posts: 2
Score: 0
Joined: 1/4/2006
Status: offline
I'm attempting to convert the code from VB to VBscript to use in a ASP page.  I'm getting an error on the line in red. 

The error message is; "An exception of type "Microsoft VBScript runtine error: Sub or Function not defined" was not handled

I'm assuming that the error is caused by the "[A-Z]"  portion of the If statement.  

How do I resolve?




' Convert all non-alpha
' chars to spaces.
'
For i = 1 To Len(WordStr)
   b = Mid(WordStr, i, 1)
   If (Not (b Like "[A-Z]")) Then
       WordStr = Replace(WordString, b, " ")
   End If
Next
 
 
Post #: 1
 
 RE: Newbie If question - 1/4/2006 10:27:31 AM   
  ehvbs

 

Posts: 2204
Score: 50
Joined: 6/22/2005
From: Germany
Status: offline
Hi mcauliff,

you could use a RegExp and Replace like this:


      

(in reply to mcauliff)
 
 
Post #: 2
 
 RE: Newbie If question - 1/5/2006 1:06:36 AM   
  mcauliff

 

Posts: 2
Score: 0
Joined: 1/4/2006
Status: offline
Thank you for the input.  I was able to find another method of doing a Soundex conversion.  It is not as complex.  I will have to read and learn about the RegExp

(in reply to ehvbs)
 
 
Post #: 3
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> ASP >> Newbie If question Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts