jstiegelmeyer
Programmer
I would like to set up some predefined constants for use as arguments in routines stored in my class.
I'd like for the names of the constants to pop up as suggestions when I'm calling the routines. If this isn't very clear, it's because I'm not sure how to state it. Let me try an example.
Inside my class, I have a routine:
Public Sub PrintReport(strRptType as string)
There are two kinds of reports, "Brief" and "Narrative". I'd like to set up two constants inside my class:
cBrief = "Brief"
cNarr = "Narrative"
And when I call PrintReport using an instance of the class, I can type in:
Call PrintReport(cBrief)
How do I declare cBrief and cNarr to make this possible? Is it possible that after I type "Call Print Report(" that "cBrief" and "cNarr" would appear as options for me to select.
A similar example:
MsgBox "Message", vbInformation + vbOKOnly
I want cBrief and cNarr to appear in a list just like vbInformation and vbOKOnly appear when calling the MsgBox routine.
This isn't a big deal, but something I've been trying for a while to figure out. I anybody has the answer to this, I would love to hear it!
Thanks,
Jamie
I'd like for the names of the constants to pop up as suggestions when I'm calling the routines. If this isn't very clear, it's because I'm not sure how to state it. Let me try an example.
Inside my class, I have a routine:
Public Sub PrintReport(strRptType as string)
There are two kinds of reports, "Brief" and "Narrative". I'd like to set up two constants inside my class:
cBrief = "Brief"
cNarr = "Narrative"
And when I call PrintReport using an instance of the class, I can type in:
Call PrintReport(cBrief)
How do I declare cBrief and cNarr to make this possible? Is it possible that after I type "Call Print Report(" that "cBrief" and "cNarr" would appear as options for me to select.
A similar example:
MsgBox "Message", vbInformation + vbOKOnly
I want cBrief and cNarr to appear in a list just like vbInformation and vbOKOnly appear when calling the MsgBox routine.
This isn't a big deal, but something I've been trying for a while to figure out. I anybody has the answer to this, I would love to hear it!
Thanks,
Jamie