Help using 'Converting VBA code into HTML - COM add-in'

chiello

Well-known Member
Joined
Jan 18, 2005
Messages
848
Ciao everybody,
I have downloaded and installed the Converting VBA code into HTML - COM add-in by bykin.

The generation of HTML file works fine (the color of the fonts, the color of the background and the font are the same as the VBE in appearance).

Unfortunately, bykin "HOW TO USE THIS Add-in:" instructions finish here and steps to post VBA code on the board are not described.

What I have tried to do is to copy the HTML code of the generated file onto the board.
The result is shown below with a stupid sample code:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>VBAProject_Modulo1.htm</title>
<style type=text/css>
<!--
body {background-color: #ffffff; color: #000000; font-family: "Courier New"; font-size: 10pt}
.keyword {background-color: #ffffff; color: #000080}
.comment {background-color: #ffffff; color: #008000}
-->
</style>
</head>
<body>
<nobr>
<div> <span class="keyword">Sub</span> Macro1()</div>
<div> <span class="comment">'</span></div>
<div> <span class="comment">' Macro1 Macro</span></div>
<div> <span class="comment">'</span></div>
<div> </div>
<div> <span class="comment">'</span></div>
<div>    <span class="keyword">If</span> 1 = 1 <span class="keyword">Then</span></div>
<div>        AA = 1</div>
<div>    <span class="keyword">Else</span></div>
<div>        AA = 2</div>
<div>    <span class="keyword">End If</span></div>
<div> <span class="keyword">End Sub</span></div>
</nobr>
</body></html>

Please HELP!!
:oops: :oops:
 

NateO

Legend
Joined
Feb 17, 2002
Messages
9,700
Re: Help using [b]Converting VBA code into HTML - COM add-in

Hello,

Bykin doesn't post here, to my knowledge.

That particular Add-in works well for a cross-office platform for generating generic HTML files.

For posting formatted code at MrExcel.com, see the following:
http://www.mrexcel.com/vbaddin.shtml
 

chiello

Well-known Member
Joined
Jan 18, 2005
Messages
848
Thank you NateO for your answer.

Below an attempt to verify the functioning

<font face=Courier New>
<SPAN style="color:#00007F">Public</SPAN> <SPAN style="color:#00007F">Sub</SPAN> FirstBlankCol()
<SPAN style="color:#00007F">Dim</SPAN> DataCol <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>, LeftCol <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>
<SPAN style="color:#00007F">Dim</SPAN> ColFound <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Boolean</SPAN>

ColFound = <SPAN style="color:#00007F">False</SPAN>
DataCol = 5 <SPAN style="color:#007F00">' You know the right one</SPAN>
LeftCol = DataCol - 1

<SPAN style="color:#00007F">While</SPAN> LeftCol >= 1 And <SPAN style="color:#00007F">Not</SPAN> ColFound
    <SPAN style="color:#00007F">With</SPAN> Columns(LeftCol)
    <SPAN style="color:#00007F">If</SPAN> .SpecialCells(xlCellTypeBlanks).Count = .SpecialCells(xlCellTypeLastCell).Row <SPAN style="color:#00007F">Then</SPAN>
        ColFound = <SPAN style="color:#00007F">True</SPAN>
        .Select
    <SPAN style="color:#00007F">Else</SPAN>
        LeftCol = LeftCol - 1
    <SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">If</SPAN>
    <SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">With</SPAN>
<SPAN style="color:#00007F">Wend</SPAN>

<SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">Sub</SPAN>
<SPAN style="color:#00007F">Sub</SPAN> Macro6()</FONT>
 

TrippyTom

Well-known Member
Joined
Nov 16, 2004
Messages
587
I used this last night and it didn't preserve the indents in my code. How did you get that to work?
 

Forum statistics

Threads
1,147,621
Messages
5,742,188
Members
423,710
Latest member
Duarte85

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
Top