Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default trouble w/ creating a VBA function that uses an enum in it's parameters

Greetings,

I have an enum that I use as a variable in a function. If I call on
the function from w/in the VBA IDE, the enum values are displayed, but
not when I call on the function from w/in Excel.

I have tried all sorts of things, but I am at my wit's end. Here is
the code...

Public Enum To_Unit
eMinute = 1
eHour = 2
eDay = 3
eWeek = 4
eMonth = 5
End Enum

Public Function ChangeUnit(Target As Range, ToUnit As To_Unit) As Long


Thanks in advance,
Jacob

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 811
Default trouble w/ creating a VBA function that uses an enum in it's parameters

Hi Jacob,

If you mean that Excel doesn't display the text values of your
enumeration members when you use your function as a worksheet function, it's
because Excel doesn't support this feature for worksheet functions.

--
Rob Bovey, Excel MVP
Application Professionals
http://www.appspro.com/

* Take your Excel development skills to the next level.
* Professional Excel Development
http://www.appspro.com/Books/Books.htm

wrote in message
oups.com...
Greetings,

I have an enum that I use as a variable in a function. If I call on
the function from w/in the VBA IDE, the enum values are displayed, but
not when I call on the function from w/in Excel.

I have tried all sorts of things, but I am at my wit's end. Here is
the code...

Public Enum To_Unit
eMinute = 1
eHour = 2
eDay = 3
eWeek = 4
eMonth = 5
End Enum

Public Function ChangeUnit(Target As Range, ToUnit As To_Unit) As Long


Thanks in advance,
Jacob



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default trouble w/ creating a VBA function that uses an enum in it's parameters

OK, that would answer it. Thanks.

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
Trouble creating table lindyq Excel Discussion (Misc queries) 0 February 24th 10 04:54 PM
having trouble creating chart to show monthly totals Ian Roberts Charts and Charting in Excel 2 June 5th 05 06:36 PM
Creating a local and hidden name; Parameters Kevin H. Stecyk[_2_] Excel Programming 13 January 26th 05 09:41 PM
Enum Daniel[_4_] Excel Programming 3 December 22nd 03 12:30 AM
Enum in Excel 97 Chip Pearson Excel Programming 0 September 26th 03 10:03 PM


All times are GMT +1. The time now is 11:15 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"