Page 4 of 7 FirstFirst ... 23456 ... LastLast
Results 31 to 40 of 62

Thread: BBCode Table

  1. #31
    Junior Member pike's Avatar
    Join Date
    Dec 2011
    Posts
    27
    Rep Power
    0
    just unlucky that code was in the correct order that the complier read this bit (with noparse tags)
    Code:
    [table=" & """" & "class:thin_grid" & """" & "]" & vbNewLine
        BB_Code = BB_Code & "[tr][td][font=Wingdings]v[/font][/td]" & vbNewLine
        For Each BB_Cells In BB_Range.Rows(1).Cells
            strWidth = Application.WorksheetFunction.RoundUp(BB_Cells.ColumnWidth * 7.5, 0)
            BB_Code = BB_Code & "[td=" & """" & "bgcolor:#ECF0F0, align:center, width:" & strWidth & """" & "][B]" & Split(BB_Cells.Address, "$")(1) & "[/B][/td]" & vbNewLine
        Next BB_Cells
        BB_Code = BB_Code & "[/tr]"
        For Each BB_Row In BB_Range.Rows
            BB_Code = BB_Code & "[tr]"
            BB_Code = BB_Code & "[td=" & """" & "bgcolor:#ECF0F0, align:center" & """" & "][B]" & BB_Row.Row & "[/B][/td]" & vbNewLine
            For Each BB_Cells In BB_Row.Cells
                strFontColour = objColour(BB_Cells.Font.Color)
                strBackColour = objColour(BB_Cells.Interior.Color)
                strAlign = FontAlignment(BB_Cells)
                BB_Code = BB_Code & "[td=" & """" & "bgcolor:" & strBackColour & ", align:" & strAlign & """" & "][COLOR=""" & strFontColour & """]" & IIf(BB_Cells.Font.Bold, "[B]", "") & BB_Cells.Text & IIf(BB_Cells.Font.Bold, "[/B]", "") & "[/COLOR][/td]" & vbNewLine
            Next BB_Cells
            BB_Code = BB_Code & "[/tr]" & vbNewLine
        Next BB_Row
        BB_Code = BB_Code & "[/table]
    as (without noparse tags)
    Code:
    v " & Split(BB_Cells.Address, "$")(1) & "
    " & BB_Row.Row & " [COLOR=""" & strFontColour & """]" & IIf(BB_Cells.Font.Bold, "", "") & BB_Cells.Text & IIf(BB_Cells.Font.Bold, "", "") & "[/COLOR]
    notice the table tag at the beginning and end of syntax .. perfect storm .. always add noparse tags when displaying VBA syntax with code tags to stop them complying within the code tags
    Last edited by pike; 05-02-2016 at 04:00 PM.

  2. #32
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    9,458
    Rep Power
    10
    I sometimes previously posted such a code in normal code tags and never noticed that it did not come out right due to the problems we have been discussing.
    Maybe you too?
    I still do not see how you could have got your code to come out right in normal code tags without the extra no parse bit.

    But a nice alternative solution you got there,

    P.s. I just cleatred some space in my In Box for you - you tried to contact me, but my In Box was full
    Last edited by DocAElstein; 05-02-2016 at 04:20 PM.

  3. #33
    Junior Member pike's Avatar
    Join Date
    Dec 2011
    Posts
    27
    Rep Power
    0
    just lucky that the table tags did not a-line in the syntax to make a table .. but if I noticed I would have added the tags ..

    noparse tags are in the bbcode tags list for this very reason.. no need to change the code to suit the complier just add noparse tags

    BB code is a set of tags based on the HTML language that you may already be familiar with. They allow you to add formatting to your messages in the same way as HTML does, but have a simpler syntax and will never break the layout of the pages you are viewing. The ability to use BB code is set on a forum-by-forum basis by the administrator, so you should check the forum rules when you post a new message.

  4. #34
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    9,458
    Rep Power
    10
    Quote Originally Posted by pike View Post
    just lucky that the table tags did not a-line in the syntax to make a table .....
    Strange.. in all the code versions of your code i have they do interfere to produce things like Tables....

  5. #35
    Junior Member pike's Avatar
    Join Date
    Dec 2011
    Posts
    27
    Rep Power
    0
    where are the error post?
    or do you mean when you copy and repost the code in other forums?

  6. #36
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    9,458
    Rep Power
    10
    Quote Originally Posted by pike View Post
    where are the error post?
    or do you mean when you copy and repost the code in other forums?
    Pike,
    .....
    We have it all sorted.

    Once again,
    Almost all codes with strings in them containing BB Code Tags will cause errors when posted in normal Code Tags ( At least at MrExcel, ExcelForum and ExcelFox - At Ozgrid it would appear different, but I have little experience there. )

    So in the past, the solution was to use HTML or php Code Tags. That is what most people do, and what I do.
    But since yesterday there is a new solutiom which you found!!

    I posted loads of example along the way of what happens, all referrenced in this Thread.

    No offence Pike, but I seem to have been repeating myself time and time again in this Thread.

    You saw yourself yesterday what happens if you do not use the noparse. Until yesterday no one I know knew of that trick. ( I am not talking about noparse BB Code Tags generally here. I and lots of people know about that. But I had not seen them applied to solve this problem) - If you ask me what problem again I will go mad. lol

    Alan

  7. #37
    Junior Member pike's Avatar
    Join Date
    Dec 2011
    Posts
    27
    Rep Power
    0
    No offence Pike, but I seem to have been repeating myself time and time again in this Thread.
    none taken .. Its no secret about noparse and i am positive many know and regularly use them. Mods use the all the time for displaying the use of code tags ..eg


    [noparse][code] syntax here between tags [/code][/noparse]
    becomes
    [code] syntax here between tags [/code]

    it was a hard question to follow
    Last edited by pike; 05-03-2016 at 01:32 PM.

  8. #38
    Junior Member pike's Avatar
    Join Date
    Dec 2011
    Posts
    27
    Rep Power
    0
    have you seen this link Excelfox BBcode tags

  9. #39
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    9,458
    Rep Power
    10
    Pike: Post 37
    Quote Originally Posted by pike View Post
    .. Its no secret about noparse ....
    Alan Post #36
    Quote Originally Posted by DocAElstein View Post
    ....... I am not talking about noparse BB Code Tags generally here. I and lots of people know about that. .......
    _.........
    Quote Originally Posted by pike View Post
    .........
    it was a hard question to follow
    _..............You do not seem to have been following it , so i have been having to repeat myself over and over.

    Your Post In box is full. I cannot answer your PM's
    Last edited by DocAElstein; 05-03-2016 at 06:50 PM.

  10. #40
    Junior Member pike's Avatar
    Join Date
    Dec 2011
    Posts
    27
    Rep Power
    0
    Yes hard question to follow as you gave a anticipated solution .. not the problem until post 12 .. guess I just confused the issue by initially using phpBB code.
    Should have been code tags with noparse

Similar Threads

  1. test bbcode
    By pike in forum Test Area
    Replies: 3
    Last Post: 05-16-2016, 03:58 AM
  2. Excluding Records of one Table from the Other Table
    By Transformer in forum Tips, Tricks & Downloads (No Questions)
    Replies: 0
    Last Post: 05-17-2013, 12:32 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •