ThisWorkbook.Path / PathToFile

I am currently trying to make work some of codes, which work fine in standart excel.
According to instruction: 12.17 Why is ThisWorkbook.Path not working? I apply this code:

Dim XLSPadlock As Object
On Error GoTo Err
Set XLSPadlock = Application.COMAddIns("GXLSForm.GXLSFormula").Object
PathToFile = XLSPadlock.PLEvalVar("EXEPath") & Filename
Exit Function
Err:
PathToFile = ""
End Function

My code is:
Dim strFileName As String
Dim strFileTitle As String
strFileTitle = “PriceList.xlsb”
strFileName = PathToFile
If Dir(strFileName) = vbNullString Then
MsgBox “No Price List found’”

Another code is:
Dim WinHttpReq As Object
Set WinHttpReq = CreateObject(“Microsoft.XMLHTTP”)
WinHttpReq.Open “GET”, myURL, False, “Username”, “Password”
WinHttpReq.send
If WinHttpReq.STATUS = 200 Then
Set oStream = CreateObject(“ADODB.Stream”)
oStream.Open
oStream.Type = 1
oStream.Write WinHttpReq.responseBody
oStream.SaveToFile (PathToFile(“PriceList.xlsb”)), 2
oStream.Close
End If

Can anybody adivice how correctly apply PathToFile for above codes?

Yes, PathToFile seems to be correct in the second sample but wrong in the first sample. Try this instead:

Dim strFileName As String
Dim strFileTitle As String
strFileTitle = “PriceList.xlsb”
strFileName = PathToFile(strFileTitle)
If Dir(strFileName) = vbNullString Then
MsgBox “No Price List found’”

I try the code you offer, but still not working.
It’s working If I mention exact directory, like: strFileName = “C:\PriceList.xlsb”
Some end users may not have C drive in their computer, and as I don’t know what is name of users’ system drive I need to address to ThisWorkbook.Path, but FileToPath code of XLSPadlock is not working at me.

Is there an alternative solution to adress system drive, if you don’t know the name of drive?

PathToFile returns a full path, including system directory. Have you tried to show the path with a simple MsgBox?