I have some VBA code where I get an "Else without If" compile error. So, there is probably a missing,or extra END IF statement somewhere. But, I can't track it down. Is there any trick to help do this? It is not a lot of code, and I have tried searching for all occurances of "if", to no avail.
There is, however one thing which may somehow be affecting it. I use a number of If Then statements that are in the single line format. E.g.;
If Not EOF(1) Then Line Input #1, Current_Line
I know this form of the IF-THEN statment should not take an END IF statement. I could rewrite it in multi-line format, but I have A LOT Of these lines, and fear it would make tracking down an "else without if" error even harder.
In AutoCAD's visual LISP programming enviroment, where you have a ZILLION parenthesis, there is a command to jump to the next matching parenthesis. This is used to help track down missing parenthesis.
I should add that I am using my VBA code to extract some information from an AutoCAD log file. I must check each line to see if it has the information I am looking for.
Any advice?
Joe Dunfee
There is, however one thing which may somehow be affecting it. I use a number of If Then statements that are in the single line format. E.g.;
If Not EOF(1) Then Line Input #1, Current_Line
I know this form of the IF-THEN statment should not take an END IF statement. I could rewrite it in multi-line format, but I have A LOT Of these lines, and fear it would make tracking down an "else without if" error even harder.
In AutoCAD's visual LISP programming enviroment, where you have a ZILLION parenthesis, there is a command to jump to the next matching parenthesis. This is used to help track down missing parenthesis.
I should add that I am using my VBA code to extract some information from an AutoCAD log file. I must check each line to see if it has the information I am looking for.
Any advice?
Joe Dunfee