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
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