add some array handling

This commit is contained in:
Trowbridge 2020-01-10 14:17:57 -05:00
parent 733d65881e
commit f825c61b62

View File

@ -1,3 +1,12 @@
VERSION 1.0 CLASS
BEGIN
MultiUse = -1 'True
END
Attribute VB_Name = "TheBigOne"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Option Explicit Option Explicit
@ -1455,7 +1464,7 @@ Public Function MISCp_msgbox_cancel(ByRef Message As String, Optional ByRef TITL
MsgB.Caption = TITLE MsgB.Caption = TITLE
MsgB.tbMSG.ScrollBars = fmScrollBarsBoth MsgB.tbMSG.ScrollBars = fmScrollBarsBoth
MsgB.Show MsgB.Show
MISC_msgbox_cancel = MsgB.Cancel MISC_msgbox_cancel = MsgB.cancel
Application.EnableCancelKey = xlInterrupt Application.EnableCancelKey = xlInterrupt
End Function End Function
@ -2477,6 +2486,17 @@ Public Function SHTp_get_block(point As Range) As Variant()
End Function End Function
Public Function SHTp_GetString(point As Range) As String()
Dim x() As String
Dim pl() As Variant
pl = point.CurrentRegion
SHTp_GetString = Me.TBLp_Transpose(Me.TBLp_VarToString(pl))
End Function
Function ColumnLetter(ColumnNumber As Long) As String Function ColumnLetter(ColumnNumber As Long) As String
Dim n As Long Dim n As Long
@ -2513,3 +2533,44 @@ Function TBLp_TestNumeric(ByRef table() As String, ByRef column As Long) As Bool
Next i Next i
End Function End Function
Function TBLp_Transpose(ByRef t() As String) As String()
Dim i As Long
Dim j As Long
Dim x() As String
If LBound(t, 1) = 1 Then
End If
ReDim x(LBound(t, 2) To UBound(t, 2), LBound(t, 1) To UBound(t, 1))
For i = 1 To UBound(t, 2)
For j = 1 To UBound(t, 1)
x(i, j) = t(j, i)
Next j
Next i
TBLp_Transpose = x
End Function
Function TBLp_VarToString(ByRef t() As Variant) As String()
Dim i As Long
Dim j As Long
Dim x() As String
If LBound(t, 1) = 1 Then
End If
ReDim x(LBound(t, 1) To UBound(t, 1), LBound(t, 2) To UBound(t, 2))
For i = LBound(t, 1) To UBound(t, 1)
For j = LBound(t, 2) To UBound(t, 2)
x(i, j) = t(i, j)
Next j
Next i
TBLp_VarToString = x
End Function