Xtreme Visual Basic Talk

Xtreme Visual Basic Talk (http://www.xtremevbtalk.com/)
-   .NET General (http://www.xtremevbtalk.com/-net-general/)
-   -   vba translation (variant type) (http://www.xtremevbtalk.com/-net-general/328725-vba-translation-variant-type.html)

brolly 08-21-2017 09:42 PM

vba translation (variant type)
 
I'm at loss for how to translate the following few lines of VBA code into vb.net. Variant IndexOrNameOrID covers a variety of types.

IndexOrNameOrID can be an integer index (from zero to .Count-1)
IndexOrNameOrID can be a name that corresponds to FileProperty.Name
IndexOrNameOrID can be an ID that corresponds to FileProperty.ID

For background, this is from a class to return file metadata

Code:

  Property Get Item(ByVal IndexOrNameOrID As Variant) As FileProperty
                Set Item = VCOMObject.Item(IndexOrNameOrID)
            End Property


Goggy 08-23-2017 01:01 AM

the variant data type translates to the object data type in .Net


All times are GMT -6. The time now is 04:57 AM.

Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Search Engine Optimisation provided by DragonByte SEO v2.0.15 (Lite) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
All site content is protected by the Digital Millenium Act of 1998. Copyright©2001-2011 MAS Media Inc. and Extreme Visual Basic Forum. All rights reserved.
You may not copy or reproduce any portion of this site without written consent.