passing objects

paul j

Member
Licensed User
Is there a way to pass a object to a sub.


Sub mnuWESave_Click
'pre : er is een tabel in het geheugen
'post : er is opdracht gegeven de tabel fysiek op te slaan

Sub mnuWESave_Click
SaveTable(tblWeight, "tblWeight.dat")
end sub



Sub SaveTable(aTable, aFileName)
'pre : a table in memory
'post : table has been writen to the disk

If FileExist (aFileName) = true Then
lvYesNo = Msgbox("bestand " & aFileName & " exists, overwrite?"," ", cMsgboxYesNo, cMsgBoxQuestion)
If lvYesNo =cYes Then
gvWE_tbl_Mutaties = false
aTable.SaveCSV(aFileName, ";", true)
End If
End If

End Sub
 

paul j

Member
Licensed User
I already tried. It doesn't regonize the string as an object and give's the message "not a know control or object"
 

paul j

Member
Licensed User
I already tried. It doesn't regonize the string as an object and give's the message "not a know control or object"

:signOops: In the first moment I didn't understand your solution, but when i looked better in the help I saw what you ment. And yes it works. Thanks :sign0060:
 
Top