Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Function what to be Set to Value?

Status
Not open for further replies.

Bullsandbears123

Technical User
Feb 12, 2003
291
US
I have a function that I use for repeated procedures. When I insert the function in code it always want to be set to a value. Is there a way to get ride of having to set it?
Example (simplified):
Function myfunction()
'set cbobox to default
cbobox.value=1
end function
******************
The VBA want my to set myfunction = to something when I don't.
---It wants this
dim value as variant
value=myfunction()

---When I just want to run the function
myfunction()

Any ideas as to get the function to run with out setting it equal?

THANKS
 
Have you tried using:

Call myfunction

I have noticed on the databases that I have created that this works the same as:

value = myfunction

Scott
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top