VBHTML Maker - Problem with indentations

plix

Board Regular
Joined
Oct 10, 2006
Messages
187
Hi,

I installed this add-in a few days ago. At first I thought it worked fine, then I realized that all my code is aligned with the left margin when I post it. Basically I loose all my indentations.
Any suggestion to fix that, or is it just normal behaviour?
Thanks,

Plix
 
Hi,

I installed this add-in a few days ago. At first I thought it worked fine, then I realized that all my code is aligned with the left margin when I post it. Basically I loose all my indentations.
Any suggestion to fix that, or is it just normal behaviour?
Thanks,

Plix
No, assuming your code is indented when you write it in the VB editor, it should be indented when you paste it to the board.

Here is a small example of mine, to generate it, I ...

1. Placed my cursor anywhere in the code (in the VB editor window).

2. Through the menus in VB window ... Tools|Convert current procedure to HTML|OK

3. Moved to this post (below) and Ctrl+V or right click and choose Paste

4. Clicked 'Submit Reply'

<font face=Courier New><br><SPAN style="color:#00007F">Sub</SPAN> whichsheet()<br>    <SPAN style="color:#00007F">Select</SPAN> <SPAN style="color:#00007F">Case</SPAN> ActiveSheet.Name<br>        <SPAN style="color:#00007F">Case</SPAN> "A"<br>            <SPAN style="color:#007F00">'Sheet A code</SPAN><br>        <SPAN style="color:#00007F">Case</SPAN> "B"<br>            <SPAN style="color:#007F00">'Sheet B code</SPAN><br>    <SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">Select</SPAN><br><SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">Sub</SPAN><br></FONT>

Can you copy my code to your VB editor then repeat the steps above and post in a reply here?
 
Last edited:
Here we go Peter:

Sub whichsheet()
Select Case ActiveSheet.Name
Case "A"
'Sheet A code
Case "B"
'Sheet B code
End Select
End Sub




By the way, apologies for posting this thread in the wrong forum initially (my mistake...).
Thanks for your help,

Plix
 
Peter,

The funny thing is that when I do a preview everything looks fine, it is only when I submit the post that I loose the indentations.
Thanks for your help,

Plix
 
Peter,

The funny thing is that when I do a preview everything looks fine, it is only when I submit the post that I loose the indentations.
Thanks for your help,

Plix
Try it again without previewing.
 
Here we go:

<font face=Courier New><SPAN style="color:#00007F">Sub</SPAN> whichsheet()<br>    <SPAN style="color:#00007F">Select</SPAN> <SPAN style="color:#00007F">Case</SPAN> ActiveSheet.Name<br>        <SPAN style="color:#00007F">Case</SPAN> "A"<br>            <SPAN style="color:#007F00">'Sheet A code</SPAN><br>        <SPAN style="color:#00007F">Case</SPAN> "B"<br>            <SPAN style="color:#007F00">'Sheet B code</SPAN><br>    <SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">Select</SPAN><br><SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">Sub</SPAN><br><br></FONT>
 
Peter,

Does that mean I should not do a preview before posting then?
Is that a known bug?

Thanks,

Plix
 
Is that a known bug?
I don't know about that.


Does that mean I should not do a preview before posting then?
That is one work-around. Another would be, if you want to preview, is to do the preview then select the HTML code in your post and paste again over the top as you would most likely still have it on your clipboard.


One further thing to try first though. Go to your UserCP (left of blue bar at top of forum window) then 'Edit Options' (left hand column) then scroll right down the the bottom of the page where you should find 'Message Editor Interface' in the 'Miscellaneous Options' section. Try the different options in that dropdown. I generally use 'Standard Editor - Extra formatting controls'. Save Changes.

This is just a guess but worth a try.
 
That is one work-around. Another would be, if you want to preview, is to do the preview then select the HTML code in your post and paste again over the top as you would most likely still have it on your clipboard.

That is the solution I will have to go to.

I tried modifying the settings: the indentations were respected but then I got stars (****) in lieu of the blanks between the marging and the 1st character on the line.

Thanks for your help with that Peter.

Plix
 
I tried modifying the settings: the indentations were respected but then I got stars (****) in lieu of the blanks between the marging and the 1st character on the line.
That is where I am at too. Generally I don't preview my posts (partly to avoid that problem) but if I do preview (or edit my post) then I simple re-copy the HTML code over the old lot.
 

Forum statistics

Threads
1,221,579
Messages
6,160,616
Members
451,658
Latest member
NghiVmexgdhh

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