Jump to content

Welcome to Geeks to Go - Register now for FREE

Need help with your computer or device? Want to learn new tech skills? You're in the right place!
Geeks to Go is a friendly community of tech experts who can solve any problem you have. Just create a free account and post your question. Our volunteers will reply quickly and guide you through the steps. Don't let tech troubles stop you. Join Geeks to Go now and get the support you need!

How it Works Create Account
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