Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 40
Default Objects with .type property

I am writing an excel macro to automate some aspects of vehicle ECU
development.

The idea is to type the names of ECU calibratables in the column
headers and the values for them to take in the cells below. The macro
then steps through line by line and changes the values on the ECU by
means of an API in a 3rd party application that we use.

The variables on the ECU can be boolean, scalar, 2D maps, 3D maps or
strings.

The API returns objects which point to the memory locations on the ECU.


I read the colum headers, use an API function to find and return the
corresponding object and assemble these objects into a collection.

The Objects returned have a property called "Type", so for example
myObject.Type might be 6, referring to a 3D Map. The code uses this
property to decide how to handle the ECU variable in question.

Unfortunately, I have a problem. The "String" type of variable falls
foul of a bug in the API. I can trap this readily enough, but I need to
put a placeholder in the collection such that when the code asks for
the .Type property it gets a sensible answer and can react
appropriately.

I thought I could do this by creating a class module with a .Type
property, but VBA won't let me do this, as Type is a reserved word...

Can anyone suggest a workaround?

In summary: I want to place something (anything) in a Collection such
that [RandomItem].Type returns an integer value.

Andy Pugh
Ford UK

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Hiding objects based on property of object Bert[_3_] Excel Programming 2 October 21st 04 05:39 AM
Return value of Property Get when using enumerated type jason Excel Programming 3 August 23rd 04 01:13 PM
Get objects property names in run-time? Tom Ogilvy Excel Programming 0 February 13th 04 12:43 PM
Using Property Let with a Type as member of a Class Ken Dahlberg Excel Programming 5 December 21st 03 05:57 AM


All times are GMT +1. The time now is 10:21 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"