Juan Pablo González
MrExcel MVP
- Joined
- Feb 8, 2002
- Messages
- 11,959
As you know, there is a new -free- addin available to download, the VB HTML Maker.
Its a simple xla, that will convert your VB code into HTML (Or BB) code so you can put it in this (And other) message boards.
There are two things that are bothering me, but time has not allowed me to dig more into them.
One. Comments...
The comment indicator is a good mark to notice when one comment starts, but that's not always the case, for example:
<font face=Courier New>
<SPAN style="color:darkblue">Sub</SPAN> Test()
<SPAN style="color:green">'This will display the ASCII code</SPAN>
<SPAN style="color:green">'of the comment indicator</SPAN>
<SPAN style="color:darkblue">Debug</SPAN>.<SPAN style="color:darkblue">Print</SPAN> "The code is: " & Asc("<SPAN style="color:green">'") & ", enjoy !"</SPAN>
<SPAN style="color:darkblue">End</SPAN> <SPAN style="color:darkblue">Sub</SPAN>
</FONT>
The Asc("'") has a comment indicator, BUT should NOT be marked as a comment.
Two. Reserved words.
<font face=Courier New>
<SPAN style="color:darkblue">Sub</SPAN> Test2()
<SPAN style="color:darkblue">If</SPAN> MsgBox("Please <SPAN style="color:darkblue">Select</SPAN> the correct one !", vbOKCancel, "Error") = vbCancel <SPAN style="color:darkblue">Then</SPAN>
<SPAN style="color:darkblue">Exit</SPAN> <SPAN style="color:darkblue">Sub</SPAN>
<SPAN style="color:darkblue">End</SPAN> <SPAN style="color:darkblue">If</SPAN>
<SPAN style="color:darkblue">End</SPAN> <SPAN style="color:darkblue">Sub</SPAN>
</FONT>
In this case, the Select shouldn't be treated as a reserved word, because it is part of a string.
The code in the program is NOT password protected, so if you feel like modifying it, improving it, fixing it, etc., please, FEEL FREE TO DO IT, and let's see if we can have a better AddIn for everyone.
Post your solutions/comments in here.
Its a simple xla, that will convert your VB code into HTML (Or BB) code so you can put it in this (And other) message boards.
There are two things that are bothering me, but time has not allowed me to dig more into them.
One. Comments...
The comment indicator is a good mark to notice when one comment starts, but that's not always the case, for example:
<font face=Courier New>
<SPAN style="color:darkblue">Sub</SPAN> Test()
<SPAN style="color:green">'This will display the ASCII code</SPAN>
<SPAN style="color:green">'of the comment indicator</SPAN>
<SPAN style="color:darkblue">Debug</SPAN>.<SPAN style="color:darkblue">Print</SPAN> "The code is: " & Asc("<SPAN style="color:green">'") & ", enjoy !"</SPAN>
<SPAN style="color:darkblue">End</SPAN> <SPAN style="color:darkblue">Sub</SPAN>
</FONT>
The Asc("'") has a comment indicator, BUT should NOT be marked as a comment.
Two. Reserved words.
<font face=Courier New>
<SPAN style="color:darkblue">Sub</SPAN> Test2()
<SPAN style="color:darkblue">If</SPAN> MsgBox("Please <SPAN style="color:darkblue">Select</SPAN> the correct one !", vbOKCancel, "Error") = vbCancel <SPAN style="color:darkblue">Then</SPAN>
<SPAN style="color:darkblue">Exit</SPAN> <SPAN style="color:darkblue">Sub</SPAN>
<SPAN style="color:darkblue">End</SPAN> <SPAN style="color:darkblue">If</SPAN>
<SPAN style="color:darkblue">End</SPAN> <SPAN style="color:darkblue">Sub</SPAN>
</FONT>
In this case, the Select shouldn't be treated as a reserved word, because it is part of a string.
The code in the program is NOT password protected, so if you feel like modifying it, improving it, fixing it, etc., please, FEEL FREE TO DO IT, and let's see if we can have a better AddIn for everyone.
Post your solutions/comments in here.