Hi everyone,
I've got this array copying to a dynamic named range (Data) to sheet (Data) but it's filling 2 rows with duplicate data instead of just one. Can't figure out what I'm doing wrong here.
And here's the named range:
Thanks in advance
I've got this array copying to a dynamic named range (Data) to sheet (Data) but it's filling 2 rows with duplicate data instead of just one. Can't figure out what I'm doing wrong here.
Code:
Private Sub cbWoodReturn_Click()
Dim arrList
Dim oTab As MSForms.Tab
Dim var As Variant
With ufrooms
If .tbxRooms.Value = "" Then: .cbxRooms.DropDown: GoTo fin
arrList = Array(.tbxRooms.Text, .tsWood.SelectedItem.Caption, .tsWoodRun.SelectedItem.Caption, .tbxWoodQuant.Text, .tbxWoodPrice.Text, .tbWoodPrime.Tag, .tbWoodCaulk.Tag, .tbWoodPutty.Tag, .tbWoodStain.Tag)
worksheets("Data").Range("Data") = arrList
End With
With Me.tsWoodRun
If .Value < .Tabs.Count - 1 Then 'the active tab isn't the last tab
For Each oTab In .Tabs
oTab.Enabled = True
Next oTab
.Value = .Value + 1 'go to the next tab
Call EnableTabStrip(Me.tsWoodRun)
ElseIf .Value = .Tabs.Count - 1 Then
For Each oTab In .Tabs
oTab.Enabled = True
Next oTab
' .Value = .Value + 1 'go to the next tab
Call EnableTabStrip(Me.tsWoodRun)
End If
.Value = -1
End With
ufrooms.tbxPartPrice = "": ufrooms.tbxPartQuant = "": ufrooms.tbxWoodPrice = "": ufrooms.tbxWoodQuant = ""
fin:
End Sub
And here's the named range:
Code:
=OFFSET(Data!$A$6,0,0,COUNTA(Data!$A:$A),22)
Thanks in advance