That's not how you want to use it. Copy everything from "code start" to "code end" into a new standard module. Name the module "basCommDialog" (it doesn't actually have to be named that, but it can't be named the same as any of the functions within). Then you simply call it to populate a string variable as in the example before "code start". Here's an example from one of mine (which I borrowed from somebody else):
Code:
Function fGetMDBName(strIn As String) As String
'Calls GetOpenFileName dialog
Dim strFilter As String
strFilter = ahtAddFilterItem(strFilter, _
"Access Database(*.mdb;*.mda;*.mde;*.mdw; *.accdb;*.accde) ", _
"*.mdb; *.mda; *.mde; *.mdw; *.accdb;*.accde")
strFilter = ahtAddFilterItem(strFilter, _
"All Files (*.*)", _
"*.*")
fGetMDBName = ahtCommonFileOpenSave(Filter:=strFilter, _
OpenFile:=True, _
DialogTitle:=strIn, _
Flags:=ahtOFN_HIDEREADONLY)
End Function