LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default "Static" Methods in Class Modules

Is there anyway to create static methods in VBA Class Modules. By this I
mean methods that can be accessed from outside the Class Module without
making an instance of the object.

As a more concrete example:

I have a class module to hold a Time (a value for hour, minute, and
AM/PM). I declare various variables that are instances of the Time
object. I want to see if one time is before another but I do not
necessarily want to have to create an instance of a Time Object to do
that. (I want to be able to call functions by using Time.x as you can
do in regular Methods).

I know this is possible in the C# and C++ frameworks through the use of
Static Methods. Is it possible in VBA?

Thanks for any help.


---
Message posted from http://www.ExcelForum.com/

 
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
"Select method of Range class failed" Error Ayo Excel Discussion (Misc queries) 3 September 2nd 08 07:58 PM
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
Run-time error "1004" Select method of range class failed Tallan Excel Discussion (Misc queries) 3 March 7th 07 05:22 PM
VBE - Possible to have one of five modules in a VB project to be "default"? [email protected] Excel Discussion (Misc queries) 2 September 22nd 06 09:58 PM
"Unable to set the Formula property of the Series class" with a tw PeterQ Charts and Charting in Excel 1 February 15th 06 07:37 PM


All times are GMT +1. The time now is 10:02 AM.

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

About Us

"It's about Microsoft Excel"