Microstation VBA mdlDialog_fileOpen Help

I'm currently trying to create a dialog box to return selected file names for another macro.

I've using the code from Learning Microstation VBA: The mdlDiaiog_fileOpen Function, of which I'm planning to modify for my needs.

Declare Function mdlDialog_fileOpen Lib "stdmdlbltin.dll" (ByVal fileName As String, ByVal rFileH As Long, ByVal resourceld As Long, ByVal suggestedFileName As String, ByVal filterString As String, ByVal defaultDirectory As String, ByVal titleString As String) As Long

Sub TestFileOpenA()

    Dim strFName As String
    Dim lngfhandle As Long
    Dim lngrid As Long
    Dim retVal As Long
    strFName = Space(255)
    retVal = mdlDialog_fileOpen(strFName, lngfhandle, lngrid, "*.dgn ", "C:\MicroStation VBA", "Open File")
    Select Case retVal
    Case 0 ' Open
    strFName = Left(strFName.InStr(l, strFName, Chr(O)) - 1)
    MsgBox "File Selected: " & vbCr & strFName
    Case 1 ' Cancel
    MsgBox "No File Selected."
End Select

End Sub

Unfortunately it doesn't seem to work.

When I play this macro I get a Compile error: Argument not optional, highlighting "mdlDialog_fileOpen" inside the procedure as the problem.

I've checked to make sure the dll "stdmdlbltin.dll" is in the right directory.

I'm running Microstation V8i (SS3) on a Windows 7 OS if that helps

Not sure what else to check. Any help would be greatly appreciated.

Regards,

Josh