Jump to content

Welcome to Geeks to Go - Register now for FREE

Geeks To Go is a helpful hub, where thousands of volunteer geeks quickly serve friendly answers and support. Check out the forums and get free advice from the experts. Register now to gain access to all of our features, it's FREE and only takes one minute. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more.

Create Account How it Works
Photo

VBScript


  • Please log in to reply

#1
boytheracer

boytheracer

    Member

  • Member
  • PipPip
  • 18 posts
I am currently regoing over previous work i have done in VBScript over 8 months ago and wondered if someone could help as a litlle rusty. I Have a total of 5 questions that need to be helped with. The work is to be done in Frontpage or dreamweaver. Am a total novice so need real guidance

Thank you
  • 0

Advertisements


#2
Swandog46

Swandog46

    Malware Expert

  • Member
  • PipPipPipPip
  • 1,026 posts
  • MVP
I don't know a LOT about VBscript (I've only used it once or twice), but if you post your questions I'll see if I can help any... :whistling:
  • 0

#3
boytheracer

boytheracer

    Member

  • Topic Starter
  • Member
  • PipPip
  • 18 posts
Write a function, named tetTitle, to test whethera string is either Mr,Mrs or Miss. The string should be passed tp testTitles and the function should be returmed a Boolean value

thank you
  • 0

#4
Hai Mac

Hai Mac

    Member

  • Member
  • PipPipPip
  • 260 posts
Hi boytheracer,

I tried to write a backbone for your testTitle function. Not sure if it works, but try it. :whistling:

Public Function testTitle(name As String)
 Dim secondLetter As String, thirdLetter as String
 secondLetter = Mid(name, 2, 1)
 
 If secondLetter = "i" Or secondLetter = "s" Then
  'name belongs to a Miss (or Ms)
 ElseIf secondLetter = "r" Then
  'either Mr or Mrs, further test
  thirdLetter = Mid(name, 3, 1)
  If thirdLetter = "s" Then
   'name belongs to a Mrs
  Else
   'name belongs to a Mr
  End If
 End if
End Function

Hope it is self explanatory

Edited by Hai Mac, 23 August 2006 - 02:12 PM.

  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP