View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
[email protected] paul.robinson@it-tallaght.ie is offline
external usenet poster
 
Posts: 789
Default Can somebody help me with this code?

Hi
This block of if, then else's is surely missing a few End If's. No idea
where they would go as I don't know if they are being nested or not. I
would recommend nesting your code.
Your error message often comes up when the real problem is with an
If..then..else or a With...end With or some such.

If IsEmpty(NandMVariable) Then
NandMVariable = ""
Else
If IsEmpty(NVariable) Then
NandMVariable = "char(59) & ' ' & char(34) & $DATUM &
char(34) & MVariable & char(59)"
Else
If IsEmpty(MVariable) Then
NandMVariable = "char(59) & ' ' & char(34) & $DATUM &
char(34) & NVariable & char(59)"
Else
NandMVariable = " char(34) & $DATUM & char(34) &
NVariable &
char(34)_char(34) &
MVariable(char(59)"
End If

regards
Paul