Click here to Skip to main content
15,901,505 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Replacing & during conversion of Excel to XML using VBA Pin
priyaahh21-Jul-10 23:36
priyaahh21-Jul-10 23:36 
GeneralRe: Replacing & during conversion of Excel to XML using VBA Pin
AnnieMacD22-Jul-10 4:34
AnnieMacD22-Jul-10 4:34 
QuestionIIF strange behaviour Pin
ddecoy19-Jul-10 21:59
ddecoy19-Jul-10 21:59 
AnswerRe: IIF strange behaviour Pin
DaveAuld19-Jul-10 22:52
professionalDaveAuld19-Jul-10 22:52 
AnswerRe: IIF strange behaviour Pin
Luc Pattyn19-Jul-10 23:12
sitebuilderLuc Pattyn19-Jul-10 23:12 
GeneralRe: IIF strange behaviour Pin
Dalek Dave19-Jul-10 23:28
professionalDalek Dave19-Jul-10 23:28 
GeneralRe: IIF strange behaviour Pin
ddecoy20-Jul-10 0:10
ddecoy20-Jul-10 0:10 
AnswerRe: IIF strange behaviour Pin
Dave Kreskowiak20-Jul-10 2:04
mveDave Kreskowiak20-Jul-10 2:04 
Yeah, and ....?? It doesn't surprise me in the least.

You cannot convert String.Emtpy to a Decimal type and, the way you coded it, IIF can either return a String ("1") or Decimal. The compiler can't figure out what the primary type of the return value is supposed to be and there is no implicit conversion available to go from String to Decimal. If you has IIF returning two different numeric types, say Integer and Short, this wouldn't be a problem because a Short can be upsized into an Integer, so the return type for IIF would be Integer.

A guide to posting questions on CodeProject[^]



Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic
     2006, 2007, 2008
But no longer in 2009...




GeneralRe: IIF strange behaviour Pin
ddecoy20-Jul-10 2:11
ddecoy20-Jul-10 2:11 
AnswerRe: IIF strange behaviour Pin
Luc Pattyn20-Jul-10 2:15
sitebuilderLuc Pattyn20-Jul-10 2:15 
GeneralRe: IIF strange behaviour Pin
Eddy Vluggen20-Jul-10 2:27
professionalEddy Vluggen20-Jul-10 2:27 
AnswerRe: IIF strange behaviour Pin
ddecoy20-Jul-10 3:14
ddecoy20-Jul-10 3:14 
GeneralRe: IIF strange behaviour Pin
Dave Kreskowiak20-Jul-10 3:41
mveDave Kreskowiak20-Jul-10 3:41 
AnswerRe: IIF strange behaviour Pin
Dave Doknjas20-Jul-10 12:00
Dave Doknjas20-Jul-10 12:00 
AnswerThe problem is with the CType, not the IIf Pin
Gregory Gadow22-Jul-10 3:55
Gregory Gadow22-Jul-10 3:55 
Questionhow to make treenode style changed when mouse over it ? Pin
sanyexian19-Jul-10 14:47
sanyexian19-Jul-10 14:47 
AnswerRe: how to make treenode style changed when mouse over it ? Pin
Abhinav S19-Jul-10 18:34
Abhinav S19-Jul-10 18:34 
GeneralRe: how to make treenode style changed when mouse over it ? Pin
sanyexian19-Jul-10 19:51
sanyexian19-Jul-10 19:51 
Questionadding tab control in VB6 Pin
Sakhalean19-Jul-10 3:09
Sakhalean19-Jul-10 3:09 
AnswerRe: adding tab control in VB6 Pin
E.F. Nijboer19-Jul-10 4:47
E.F. Nijboer19-Jul-10 4:47 
GeneralRe: adding tab control in VB6 Pin
Sakhalean19-Jul-10 18:55
Sakhalean19-Jul-10 18:55 
AnswerRe: adding tab control in VB6 Pin
Neville Nazerane20-Jul-10 1:48
Neville Nazerane20-Jul-10 1:48 
GeneralRe: adding tab control in VB6 Pin
E.F. Nijboer20-Jul-10 6:00
E.F. Nijboer20-Jul-10 6:00 
AnswerRe: adding tab control in VB6 Pin
Goutam Patra19-Jul-10 22:42
professionalGoutam Patra19-Jul-10 22:42 
AnswerRe: adding tab control in VB6 Pin
MikeD 227-Jul-10 3:38
MikeD 227-Jul-10 3:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.