[CODE]
Public Function GetFullFromRelativeFilename(ByVal BasePath As String, ByVal Filename As String) As String
  Dim xLong1 As Long
  'Dim xLong2 As Long
  
  Filename = Replace(Filename, "\.\", "\")
  If Left(Filename, 2&) = ".\" Then Filename = Mid(Filename, 3&)
  If Left(Filename, 2&) = "\\" Then
    ElseIf Mid(Filename, 2&, 2&) = ":\" Then
    ElseIf Left(Filename, 1&) = "\" Then
    GetFullFromRelativeFilename = Left(BasePath, 2&) & Filename
    ElseIf Not BasePath = "" Then
    Do While Left(Filename, 3&) = "..\"
      xLong1 = InStrRev(BasePath, "\") - 1&
      If xLong1 = -1& Then
        BasePath = ""
        Exit Do
        Else
        BasePath = Left(BasePath, xLong1)
        Filename = Mid(Filename, 4&)
        End If
      Loop
    If Not BasePath = "" Then
      GetFullFromRelativeFilename = BasePath & "\" & Filename
      End If
    End If
  If GetFullFromRelativeFilename = "" Then
    GetFullFromRelativeFilename = Filename
    End If
  End Function