Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
FlaviusFlav wrote ...
rs.open "someurl" dosomething(rs) <---Type mismatch here private sub dosometing(rs as ADODB.recordset) What puzzle's me is why you would want to pass an *open* recordset by reference to a procedure. It would be very complicated for the calling procedure if the dosometing code changed the rs pointer to reference another recordset object. I suspect you want Private Sub DoSometing(ByVal rs as ADODB.Recordset) It pays to always be explicit; don't rely on default behavior. Ask yourself whether you want ByVal or ByRef: the answer is usually ByVal but the default is ByRef. Being explicit will help the person who inherits your project when you move on to greater things. -- |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
return recordset | Excel Discussion (Misc queries) | |||
Recordset in Excel | Excel Programming | |||
Recordset | Excel Programming | |||
ADODB Recordset | Excel Programming | |||
Default recordset type? | Excel Programming |