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

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)

Forum statistics

Threads
1,224,827
Messages
6,181,195
Members
453,021
Latest member
pingpong7117

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