Djblois
04-28-2010, 11:46 AM
Someone on here gave me this code to try so that I can find the size of an array and fill headings in based on the size of the Array. However it is not working. Here is the code that I am trying:
Sub comAddColHeadings(ParamArray arrHeadings() As Variant)
Range("A1").Resize(, UBound(arrHeadings) - LBound(arrHeadings) + 1).Value = arrHeadings
End Sub
What it is supposed to do is:
1) I call that sub with the Headings that I want to use
2) It determines the size of the Array
3) it fills the amount of cells across based on the Size of the Array
however nothing is coming out but it is not crashing either.
Sub comAddColHeadings(ParamArray arrHeadings() As Variant)
Range("A1").Resize(, UBound(arrHeadings) - LBound(arrHeadings) + 1).Value = arrHeadings
End Sub
What it is supposed to do is:
1) I call that sub with the Headings that I want to use
2) It determines the size of the Array
3) it fills the amount of cells across based on the Size of the Array
however nothing is coming out but it is not crashing either.