Hi there folks! I am working on a game for the classroom. I have a pathway and a filename, and I just need the pathway from it. I know about using Ubound to split the path and filename... like this...

VB Code:
  1. Dim strPath as string
  2. Dim strFile as string
  3. Dim UB as string
  4.  
  5.     strPath = LBLPath.Caption
  6.     strFile = Split(strPath, "")
  7.     UB = UBound(strFile)
  8.  
  9.     MsgBox strFile(UB)
  10. End Sub

Now that will def give me the filename, but what I want is the path for the file. Is there a different way to split? Thanks!!