In Sheet1
I have a table with only the Header of each column but blank values, I run a VBA that creates an Array that has the same number of columns in the table. Is there any way to export all values from this array to the Excel table at one time using VBA code?
I use the code below to export to Sheet1
, I wanted to do the same function but export directly into a table in Sheet1
.
Private Sub Workbook_Open()
Dim Filename As String, line As String
Dim i As Integer
DB_Bovespa_Option = Application.Run("Funcao", Range("DATA"), 1, 0, "Bovespa")
PrintArray DB_Bovespa_Option, ActiveWorkbook.Worksheets("Sheet1").[A2]
End Sub
Sub PrintArray(Data As Variant, Cl As Range)
Cl.Resize(UBound(Data, 1), UBound(Data, 2)) = Data
End Sub