VB HTML Maker

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.
 
I'm not sure if I am hijacking this post or not...

Error with Set rngSelection code
**I am trying to use the html maker for the first time - when I click Select Used Range or Convert Sheet to HTML --- it takes me to the VB editor and the word Left in the string below is highlighted. **

reInput:
On Error Resume Next
Set rngSelection = Application.InputBox(strMsg1, Left(strMsg2, 46), Selection.Address, Type:=8)
If rngSelection Is Nothing Then Exit Sub
 
Upvote 0

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
Well, questions like yours usually go in the "About this board" section. But are you referring to the VB html maker, or Colo's HTML maker? They're 2 different things :)
 
Upvote 0

Forum statistics

Threads
1,221,691
Messages
6,161,310
Members
451,696
Latest member
Senthil Murugan

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top