Vote for BP.Net for the 2013 Forum of the Year! Click here for more info.

» Site Navigation

» Home
 > FAQ

» Online Users: 604

0 members and 604 guests
No Members online
Most users ever online was 47,180, 07-16-2025 at 05:30 PM.

» Today's Birthdays

None

» Stats

Members: 75,910
Threads: 249,115
Posts: 2,572,187
Top Poster: JLC (31,651)
Welcome to our newest member, coda

Quad het?

Printable View

  • 04-26-2010, 10:33 AM
    RandyRemington
    Re: Quad het?
    Trying the forum code. If this works if an admin could remove the html code in my post above it will make this thread not so wide.

  • 04-26-2010, 10:39 AM
    RandyRemington
    Re: Quad het?
    Here is the modified Excel macro. Just select your area in the worksheet and then run this macro to get the forum code into the clipboard for paste. Now I just need a macro to fill in the worksheet!

    Sub forumPunnett()
    '
    ' forumPunnett Macro
    ' Ball-Pythons.net Forum Code Macro
    '
    Dim strBL As String
    Dim strBR As String
    Dim strTS As String
    Dim strTE As String
    Dim strBS As String
    Dim strBE As String
    Dim strDS As String
    Dim strDE As String
    Dim strTable As String
    Dim strCell As String
    Dim lgnFRow As Long
    Dim lgnFColumn As Long
    Dim lgnRows As Long
    Dim lgnColumns As Long
    Dim r As Long
    Dim c As Long
    Dim objTable As New DataObject

    strBL = "["
    strBR = "]"
    strTS = strBL & "table" & strBR
    strTE = strBL & "/table" & strBR
    strBS = strBL & "b" & strBR
    strBE = strBL & "/b" & strBR
    strDS = "|"
    strTable = ""
    strCell = ""
    lgnFRow = ActiveWindow.RangeSelection.Row
    lgnFColumn = ActiveWindow.RangeSelection.Column
    lgnRows = ActiveWindow.RangeSelection.Rows.Count
    lgnColumns = ActiveWindow.RangeSelection.Columns.Count

    For r = lgnFRow To lgnRows + lgnFRow - 1
    For c = lgnFColumn To lgnColumns + lgnFColumn - 1
    If r = lgnFRow Or c = lgnFColumn Then strCell = strBS & Cells(r, c).Value & strBE Else strCell = Cells(r, c).Value
    strTable = strTable & strCell & strDS
    Next c
    strTable = Mid(strTable, 1, Len(strTable) - Len(strDS)) & Chr(13) & Chr(10)
    Next r

    strTable = strTS & strTable & strTE

    objTable.SetText strTable
    objTable.PutInClipboard
    Set objTable = Nothing

    '
    End Sub
Powered by vBadvanced CMPS v4.2.1