ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Get an object's type if it's declared as Variant (https://www.excelbanter.com/excel-programming/374450-get-objects-type-if-its-declared-variant.html)

[email protected]

Get an object's type if it's declared as Variant
 
Suppose I have:

Dim objRecordSet as Variant

Set objRecordSet = objCommand.Execute

How do I get the type of objRecordSet so that I can modify my code and
declare objRecordSet specifically instead of as a Variant?

Thanks.


NickHK

Get an object's type if it's declared as Variant
 
Follow the response to your later post.
Enter "Execute" in the second combo click the search button to its right,
with the binoculars.
Look at the bottom; you will something like
Function Execute([RecordsAffected], [Parameters], [Options As Long = -1]) As
Recordset

So you can see that this function returns a recordSet object.

NickHK

wrote in message
oups.com...
Suppose I have:

Dim objRecordSet as Variant

Set objRecordSet = objCommand.Execute

How do I get the type of objRecordSet so that I can modify my code and
declare objRecordSet specifically instead of as a Variant?

Thanks.





All times are GMT +1. The time now is 05:35 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com