help with function calling

Nogslaw

Well-known Member
Joined
Jul 9, 2004
Messages
904
I have been reading several posts and cannot figure out how to do this. I want to use a function call in my code. In English, I want to do something like this:

. . . code

call get_the_name

. . . code

the answer is "the name"



public function get_the_name

userform1.show
the name = userform1.combobox1.value

end function
 

Some videos you may like

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.

Nogslaw

Well-known Member
Joined
Jul 9, 2004
Messages
904
through much trial and error, figured it out.

code ...

answer = getname (thename)

. . . code

"the answer is" & answer



public function getname

userform1.show
getname = userform1.combobox1.value

end function
 

Watch MrExcel Video

Forum statistics

Threads
1,118,290
Messages
5,571,327
Members
412,382
Latest member
Langtn02
Top