GEOPAK-DRAINAGE- VBA DOUBT

I am writing a macro  in Microstation/ Geopak VBA  to create Drainagr profile legend table for Drainage profiles . I activated GEOPAK drainage and opened  AL_KHARJ_SD_001_detail_design_OF-A3.gdf.  But my program is not responding while debugging the Set drainage_file = geopak.OpenDrainageByFile(strname)  marked code and it is closing the file without any response. Please help me where it went wrong.

Public drainage_file As Drainage
Public DPROFILES As DrainageProfiles

Private Sub UserForm_initialize()
Me.Caption = "PROFILE-TABLES CREATION"
Cboprofile.Style = fmStyleDropDownList
Set drainage_file = drain_file("AL_KHARJ_SD_001_detail_design_OF-A3.gdf")
' Set drainage_file = drain_file(fileopenA())
Set DPROFILES = drainage_file.Profiles
Dim cc As Long
For cc = 1 To DPROFILES.COUNT
Cboprofile.AddItem DPROFILES.Item(cc).Name
Next cc
frmproftable.Show
End Sub

Function drain_file(strname As String) As Drainage
Set drainage_file = geopak.OpenDrainageByFile(strname)
If (drainage_file Is Nothing) Then
ShowStatus "drainage design file is not selected"
MsgBox "drainage design file is not selected:"
MsgBox "exiting program"
Exit Function
Else
End If
drain_file = drainage_file
End Function