vba translation (variant type)
vba translation (variant type)
vba translation (variant type)
vba translation (variant type)
vba translation (variant type)
vba translation (variant type) vba translation (variant type) vba translation (variant type) vba translation (variant type) vba translation (variant type) vba translation (variant type) vba translation (variant type) vba translation (variant type)
vba translation (variant type) vba translation (variant type)
vba translation (variant type)
Go Back  Xtreme Visual Basic Talk > > > vba translation (variant type)


Reply
 
Thread Tools Display Modes
  #1  
Old 08-21-2017, 08:42 PM
brolly brolly is offline
Newcomer
 
Join Date: Nov 2014
Posts: 2
Default 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
Reply With Quote
  #2  
Old 08-23-2017, 12:01 AM
Goggy's Avatar
Goggy Goggy is offline
Contributor
 
Join Date: Sep 2005
Location: Enschede,The Netherlands
Posts: 670
Default

the variant data type translates to the object data type in .Net
__________________
As finishing touch, god created the Dutch!

utterly useless, but always trying to help
Reply With Quote
Reply

Tags
indexornameorid, variant, corresponds, property, vba, fileproperty.name, fileproperty.id, background, file, item, set, fileproperty, itembyval, class, return, metadata, integer, translate, loss, translation, type, lines, types, index, .count-1


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
vba translation (variant type)
vba translation (variant type)
vba translation (variant type) vba translation (variant type)
vba translation (variant type)
vba translation (variant type)
vba translation (variant type) vba translation (variant type) vba translation (variant type) vba translation (variant type) vba translation (variant type) vba translation (variant type) vba translation (variant type)
vba translation (variant type)
vba translation (variant type)
 
vba translation (variant type)
vba translation (variant type)
 
-->