Click to See Complete Forum and Search --> : how to define kind of global constants?


Marc from D
November 22nd, 2008, 04:03 PM
Hi!

What is the VB-Version from the c-statement:

in a.h:
#define home 0
#define guest 1

in b.h:
#include a.h


I try to use an enum, but the problem I'm facing is, that I do not have the definend enum-type available in another form or dialog.

In other words:
How can I define project-wide (global) constants?


Thanks in advance!


Marc

dglienna
November 22nd, 2008, 07:05 PM
Put the PUBLIC variables into a MODULE and they will be global to your program.

Public Home as Integer = 0

You can use CONST (not sure about globally)