Results 1 to 10 of 40

Thread: test BB Code

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #4
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    9,355
    Rep Power
    10
    Using Excel 2007
    Row\Col
    D
    E
    F
    G
    H
    I
    J
    K
    63 87 24 62 97 12 47 33 77
    64 48 90 44 10 91 51 18 65
    65 65 61 69 96 84 54 13 92
    66 72 94 96 83 71 47 22 25
    67 27 94 74 21 13 31 27 76
    68 25 46 52 14 95 32 90 92
    69 54 29 53 17 45 20 10 81
    70 84 11 74 28 33 45 52 10
    71 76 55 56 91 88 76 49 26
    72 10 69 20 51 11 74 37 73
    73 46 25 94 94 53 68 57 19
    74 90 93 89 41 26 11 25 99
    75 94 61 24 29 54 85 81 20
    Sheet: Molly


    Here a bit of my code:


    PHP Code:
    Sub BB_Table_Clipboard_PikeFoxAlan() 'http://www.excelfox.com/forum/f13/bbcode-table-2077/         Dim BB_Row As Range, BB_Cells As Range, BB_Range As Range    Dim BB_Code As String, strFontColour As String, strBackColour As String, strAlign As String, strWidth As String    'Const csHEADER_COLOR As String """#FFFFFF"""    Const csHEADER_COLOR As String "black"    'Const csHEADER_BACK As String = "#888888"    Const csHEADER_BACK As String = "powderblue"    Const csROW_BACK As String = "#FFFFFF"    Set BB_Range = Selection    BB_Code = "[color=lightgrey]Using " & ExcelVersion & "[/color]" & vbCrLf 'Give Excel version    BB_Code BB_Code "[table=" """" "class:thin_grid" """" "]" vbNewLine    'BB_Code = BB_Code & "[tr][td][font=Wingdings]v[/font][/td]" & vbNewLine    BB_Code = BB_Code & "[tr=bgcolor:" & csHEADER_BACK & "][th][COLOR=" & csHEADER_COLOR & "][sub]Row[/sub]\[sup]Col[/sup][/COLOR][/th]"      ' top left cell    For Each BB_Cells In BB_Range.Rows(1).Cells 'Column Letters        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        BB_Code BB_Code "[th][CENTER][COLOR=" csHEADER_COLOR "]" ColLtr(BB_Cells.Column) & "[/COLOR][/CENTER][/th]" 'Column Letter Row    Next BB_Cells 
    _................................

    Here a bit of Admin's code from Post #3
    http://www.excelfox.com/forum/f13/bb...2077/#post9631

    PHP Code:
    Sub BB_Table_Clipboard()
        
        
    Dim BB_Row As RangeBB_Cells As RangeBB_Range As Range
        Dim BB_Code 
    As StringstrFontColour As StringstrBackColour As StringstrAlign As StringstrWidth As String
         
        Set BB_Range 
    Selection
        BB_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.50)
            
    BB_Code BB_Code "[td=" """" "bgcolor:#ECF0F0, align:center, width:" strWidth """" "][B]" Split(BB_Cells.Address"$")(1) & "[/B][/td]" vbNewLine
        Next BB_Cells 
    _........................

    But , the same code bit of Admin's copied first to my the VB Editor, and then back to a php window it does not work again….

    PHP Code:
    Sub BB_Table_Clipboard()        Dim BB_Row As RangeBB_Cells As RangeBB_Range As Range    Dim BB_Code As StringstrFontColour As StringstrBackColour As StringstrAlign As StringstrWidth As String         Set BB_Range Selection    BB_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.50)        BB_Code BB_Code "[td=" """" "bgcolor:#ECF0F0, align:center, width:" strWidth """" "][B]" Split(BB_Cells.Address"$")(1) & "[/B][/td]" vbNewLine    Next BB_Cells 
    Last edited by DocAElstein; 01-21-2016 at 08:34 PM.

Similar Threads

  1. Replies: 12
    Last Post: 09-22-2023, 03:53 PM
  2. Replies: 5
    Last Post: 06-10-2019, 10:14 PM
  3. HTML Code Test --post8798
    By DocAElstein in forum Test Area
    Replies: 19
    Last Post: 06-17-2018, 03:02 PM
  4. CODE TAG Code Test
    By DocAElstein in forum Test Area
    Replies: 5
    Last Post: 09-16-2015, 05:16 PM

Posting Permissions

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