Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 119
Default Conditional assignment?

I can't believe this hasn't come up in my code before...

Does VBA have a conditional assignment function? Like...

msg = (user = "Maury") ? "Foo" : "Bar"

Maury
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default Conditional assignment?

Nothing as concise as that but you can use iif instead of if
--
HTH...

Jim Thomlinson


"Maury Markowitz" wrote:

I can't believe this hasn't come up in my code before...

Does VBA have a conditional assignment function? Like...

msg = (user = "Maury") ? "Foo" : "Bar"

Maury

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Row Variable assignment JMay Excel Discussion (Misc queries) 3 June 28th 07 05:26 PM
point assignment Blah Excel Discussion (Misc queries) 4 July 21st 06 12:29 AM
Key Assignment Log Norma Excel Discussion (Misc queries) 0 May 12th 05 04:10 PM
Assignment problem [email protected] Excel Programming 4 October 10th 04 07:17 PM
Assignment by reference or value Mark[_36_] Excel Programming 5 February 16th 04 04:06 PM


All times are GMT +1. The time now is 12:27 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"