How to get intellisense choices on a custom function

  • Thread starter Thread starter Rick Palmer
  • Start date Start date
R

Rick Palmer

Hello all,

I have a function I have written that gets Invoices by a date range. It
looks something like this:

GetInvoicesbyDateRange(ByVal LBound as Date, ByVal UBound as Date, ByVal
CompareTo as ????) as integer

The ???? is where I have a problem. When I am using this function in code,
when I get to the CompareTo field, I want it to pop up intellisense giving
me the following choices of which date in the invoice to use for the
comparison:
CompareTo.EffectiveDate
CompareTo.InvoiceDate
CompareTo.LatterOfInvoiceandEffectiveDates

....like it does when you get to the "Buttons" field in the MsgBox function.
Anyone know how to do this??????


Thanks!



-rp
 
Enum CompareTo As Integer
EffectiveDate
InvoiceDate
LatterOfInvoiceandEffectiveDates
End Enum

Function GetInvoicesbyDateRange(ByVal LBound as Date, _
ByVal UBound as
Date, _
ByVal DateComparison
as CompareTo) As Integer

End Function
 
That parameter needs to be the CompareTo enumeration, as that is what you
want. You might want to name the parameter variable something else to avoid
problems. VS.NET will automatically pop up the enum and its members if the
type for the parameter is that enum.
 
Hell Yeah! I've been trying to figure out how to do that for like a month!
THANKS!!!!

"Mick Doherty"
 
Back
Top