Hi Folks,
I have an array that I'm trying to write to Sheet 1 of a workbook, but nothing happens and there is no error.
It's a macro with a bunch of company references so hopefully the following snippet is enough to get some insight from somebody more knowledgeable.
When I check the array contents in locals, the values are there, but it looks like the section with resize...=dat just doesn't write anything.
I have an array that I'm trying to write to Sheet 1 of a workbook, but nothing happens and there is no error.
It's a macro with a bunch of company references so hopefully the following snippet is enough to get some insight from somebody more knowledgeable.
When I check the array contents in locals, the values are there, but it looks like the section with resize...=dat just doesn't write anything.
VBA Code:
Sub Test_GetFinData()
Dim dat, datconv As Variant
Dim ws As Worksheet
Dim test As Long
Set ws = Worksheets("Sheet1")
dat = '###this is a single array of numeric values grabbed from corporate database (via an api and a separate function not shown)
'test = UBound(dat) - LBound(dat)
With ws
.Cells(2, 3).Resize(UBound(dat) - LBound(dat) + 1) = dat
End With
End Sub