Flash Games
 FAQ   Search   Memberlist   Usergroups   Register  Profile   Log in to check your private messages   Log in 


Can anyone help me to check this function?



 

Post new topic   Reply to topic  
   DEVPPL Forum Index -> Visual Basic Forum
View previous topic :: View next topic  
Author Message
zargus



Joined: 12 Feb 2007
Posts: 1

PostPosted: Mon Feb 12, 2007 11:26 am    Post subject: Can anyone help me to check this function? Reply with quote

Actually I am trying to create a function that can identify a postcode from a 'string' of address. The function should be able to verify the 5 digits (the postcode) which are located next to each other. The function that I have cannot function properly. Here is the function:

========================================
Function getpostcode (value)

dim leng As Integer
dim pc As String

For
leng=1 To len (value)
pc=mid(value,leng,1)
End if

If Is Numeric (pc) Then
pc=mid(value, leng,2)
End If

...........................

If Is Numeric (pc) =5 Then
getpostcode=pc
leng=Len (value) + 1
End If

Next leng
End Function
=========================================


I really hope there's someone out there can help me to correct the function. Thanks for your attention Wink
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    DEVPPL Forum Index -> Visual Basic Forum All times are GMT + 1 Hour
Page 1 of 1

 
 
Welcome to DEVPPL.com
You are not logged in, which means that you can't post in the forums.
Click here to Register

If you are a current member here on DEVPPL, please login below:

User: Pass:
Log me on automatically each visit:

 


Powered by phpBB © 2001, 2005 phpBB Group - Modified by DEVPPL

Flash Games - Sitemap