Excel 2016 VBA: Copy Array to Dynamic Table

jedwardo

Board Regular
Joined
Aug 21, 2012
Messages
122
Hello,

I have the array copying to the worksheet table however, the data overwrites the first line of the table each time instead of filling the table dynamically. Do I need to get the data to go into the first empty row below the table? If so how does one do that?

Code:
[/FONT][/COLOR][COLOR=#222222][FONT=Verdana]Private Sub cbWoodReturn_Click()
Dim arrList
    
   With ufRooms

    If .tsWoodRun.Value = -1 Then: .cbWoodReturn.Visible = False
   
'    'Load Items to an Array
    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
[/FONT][/COLOR][COLOR=#222222][FONT=Verdana][COLOR=#222222][FONT=Verdana]End Sub[/FONT][/COLOR][[/FONT][/COLOR][COLOR=#222222][FONT=Verdana]/CODE]

Table starts on sheet "Data" in cell "C1" with headers

Thanks,
Jordan
[/FONT][/COLOR][/LEFT]
 
Last edited:

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)

Forum statistics

Threads
1,223,903
Messages
6,175,286
Members
452,631
Latest member
a_potato

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top