|
-
Oct 19th, 2006, 08:48 PM
#1
Thread Starter
New Member
iterating over enum in Excel 2003 VBA macro
Hi all, first posting...
I need to iterate over an enum in an Excel 2003 VBA macro. The examples I see on the net, such as:
Dim items As Array
items = [Enum].GetValues(GetType(MyEnum))
Dim item As String
For Each item In items
don't work. The compiler shows an "Expected: new or Type name" error on the "Dim items as Array" line. I also get a "Sub or Function not defined" error on the "GetType()" function. I tried "GetUnderlyingType()" but got a "type mismatch" error. Can anyone give me an example of a working enum iterator for an Excel 2003 macro?
-Thanks! LloydM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|