We're a community of 1.1M IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,080,610 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

Pass an expression into a function?

Hi.

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.
Ex:

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?

Michael

1
Contributor
1
Reply
5 Minutes
Discussion Span
2 Years Ago
Last Updated
3
Views
Question
Answered
michaelzip
Light Poster
26 posts since Jan 2011
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

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

michaelzip
Light Poster
26 posts since Jan 2011
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0
Question Self-Answered as of 2 Years Ago

This question has already been solved: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
View similar articles that have also been tagged:
 
© 2013 DaniWeb® LLC
Page generated in 0.0548 seconds using 2.67MB