I don't know if it's done yet but OpenOffice.org BASIC is so close to VB6 it's scary.
Here's some sample code. Note how it uses VB6 style error handling, with on error goto's and labels, not the try/end try exception handling crapolla in VB.NET (which might be fine for other languages but not for BASIC.)
Code:
Function StoreDocument() as Boolean
Dim sCurFileExists as String
Dim iOverWrite as Integer
If (TargetFile <> "") And (Not bCancelTask) Then
On Local Error Goto NOSAVING
If oUcb.Exists(TargetFile) Then
sCurFileExists = ReplaceString(sMsgFileExists, ConvertFromUrl(TargetFile), "<1>")
sCurFileExists = ReplaceString(sCurFileExists, chr(13), "<CR>")
iOverWrite = Msgbox (sCurFileExists, 32 + 3, sMsgDLGTITLE)
Select Case iOverWrite
Case 1 ' OK
Case 2 ' Abort
bCancelTask = True
StoreDocument() = False
Exit Function
Case 7 ' No
StoreDocument() = False
Exit Function
End Select
End If
If TargetFile <> SourceFile Then
oDocument.StoreAsUrl(TargetFile,NoArgs)
Else
oDocument.Store
End If
StoreDocument() = True
NOSAVING:
If Err <> 0 Then
StoreDocument() = False
Resume CLERROR
End If
CLERROR:
End If
End Function