I just want to ask if it is possible to create a function that accepts an expression into its arguments. Just like what IIF do.

Dim strResponse as String = IIF(Msgbox("Select Yes or No", vbYesNo) = vbYes, "Yes", "No")

I forgot the code, but its the thought that counts.

Anyway, is it possible? If it is, how?


Stupid me, Msgbox returns a value, and any expression does.
Is there a way I can delete this post?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.