Figure 7


Using the Split function.

Sub AnalyzeURL
  Dim I, Name, Domain, URL
  URL = "President@Whitehouse.gov"
  HisName = Split(URL,"@")
  Domain = Split(URL,".")
  MsgBox "The Presidents e-mail name is " & HisName(0)
  MsgBox "His domain name is " & Domain(1)
  FirstPart = Domain(0)
  HisName = Split(Domain(0),"@")
  MsgBox "The president lives at the " & HisName(1)
End Sub