Darren Smith
Well-known Member
- Joined
- Nov 23, 2020
- Messages
- 631
- Office Version
- 2019
- Platform
- Windows
Hi All
My array below works fine except it will not transfer any of my formulas??
Can somebody tell me why?
My array below works fine except it will not transfer any of my formulas??
Can somebody tell me why?
VBA Code:
Private Sub Body_Type_Change()
TurnOff
Dim wsSource As Worksheet, wsDest As Worksheet
Dim Arr As Variant
Dim i As Long
Dim cmb As ComboBox
Dim RowCount As Long, ColumnCount As Long
Set wsSource = ThisWorkbook.Worksheets("Tippa Body Groups")
Set wsDest = ThisWorkbook.Worksheets("Job Card Master")
Set cmb = Me.Body_Type
Select Case cmb.Value
Case ("Tippa")
Arr = wsSource.Range("A13:O299")
Case ("Tippa with STD Cage")
Arr = wsSource.Range("Q13:AE299")
End Select
For i = LBound(Arr, 1) + 1 To UBound(Arr, 1)
Arr(i, 1) = Arr(i, 1)
Next i
RowCount = UBound(Arr, 1)
ColumnCount = UBound(Arr, 2)
wsDest.Range("A13").Resize(RowCount, ColumnCount).Value = Arr
TurnOn
End Sub