Sub/Function Arguments

M

MPM1100

I have posted this question in programming questions too... However, I am
wondering if it is possible to provide options for Sub/Function
arguments just as VB does for intrisic methods, so that when a user is typing
out the method call, a drop down box appears for each argument showing
available options?

Thanks In Advance
 
A

Albert D. Kallal

MPM1100 said:
I have posted this question in programming questions too... However, I am
wondering if it is possible to provide options for Sub/Function
arguments just as VB does for intrisic methods, so that when a user is
typing
out the method call, a drop down box appears for each argument showing
available options?

Well, If you're talking about a class object, and not a regular module, then
all properties (and public vars), and methods (code+functions) will pop up
with inteli-sense just like when you work with any other object (say, like a
record set). However there's no need to create class objects if you don't
need multiple copies or instances of that class (so in most cases it's not
worth extra effort to get some Inteli-sense during typing by choosing a
class object -- only use class objects when it makes sense to do so).

However, you can use What is called enumerate Chun's for your constants do
know that as you to type in your sub name, you will see until a sense put up
a list of parameters for that function. if you do find any constants or
enumerate Chun's for each of the parameters, then you will get a drop down
list.

eg:

Option Compare Database
Option Explicit

Enum BookingType
PrivateBooking = 1
PublicBooking = 2
End Enum

Public Sub MakeBooking(strUserName As String, intBooking As BookingType)


Now, during coding, if you type in

Call MakeBooking("Mr. Smith",

The instant you hit the "," in the above for the 2nd param, you will see
the list of booking types pop up during coding....
 
M

MPM1100

Thanks for the info... You answered the question perfectly. The Enumerate
Chun's is the goal I was searching for. Thanks again.

MPM
 
A

Albert D. Kallal

MPM1100 said:
Thanks for the info... You answered the question perfectly. The Enumerate
Chun's is the goal I was searching for. Thanks again.

I was using voice dictation software...and hit send...

The word Enumerate - "Chun's"

Was actually supposed to be the ONE word enumerations

if you think about this, the two words kind of sound the same as the one
word enumeration


So, enumerate chuns was actually suppposed to be Enumerations

My apologies for that error, and I just been experimenting with the voice
dictation software that's included with every copy of office now.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top