T
Teri
Hey all, I am trying to write a function for a Module. Here is my code:
Public Function fncModelNo(OptionKey As Variant)
Dim ModelNo As Variant
ModelNo = Left([OptionKey], InStr([OptionKey], ".") - 1)
Debug.Print ModelNo
End Function
When I try to run this I receive a Compile error: Argument not optional.
What help tells me is that I am probably missing an argument on part of my
code, unfortunately I seemed to not be able to find it.
If I put just the Left(**********) as an expresion on a query, then the code
works, but I am trying to place the code in a module so that I can use it in
other places.
Public Function fncModelNo(OptionKey As Variant)
Dim ModelNo As Variant
ModelNo = Left([OptionKey], InStr([OptionKey], ".") - 1)
Debug.Print ModelNo
End Function
When I try to run this I receive a Compile error: Argument not optional.
What help tells me is that I am probably missing an argument on part of my
code, unfortunately I seemed to not be able to find it.
If I put just the Left(**********) as an expresion on a query, then the code
works, but I am trying to place the code in a module so that I can use it in
other places.