|
-
Jul 30th, 2001, 10:36 PM
#1
Define constant
hi, I now writing a activeX control and want to define some constant which is able to use by the program which include this dll. e.g. I may define a constant pi=3.1416 and name this dll to Math.dll. Then I new a project and add it to reference, I could able to use the constant pi.
I have new a module and add a public constant, but this don't work, so what should I do?
Thank!
-
Jul 31st, 2001, 05:13 AM
#2
PowerPoster
Add a new Basic Module file and just declare as
VB Code:
Public Const pi As Double = 3.1416
or you can declare under the UserControl source file 
regards,
-
Jul 31st, 2001, 09:37 PM
#3
Thank Chris, but if I use public constant, it constant will only available within the class. I have got the solution from the other, I should use "Public Enum". but anyway, thank for your help!
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
|