white_flag
01-24-2012, 07:00 AM
Hello I have a declaration
Dim MyArr As Variant
MyArr = Application.WorksheetFunction.Transpose(ThisWorkbook.Sheets("Headers").Range("B14", Cells(LastRowNume, 2).Address).SpecialCells(xlCellTypeConstants))
but if I have a empty row between the rows then I received error 1004 ..unable to get the transpose ..etc
ex.
row1
row2
'empty row
row4
row5
row6
when I have no empty row between rows everything is ok
row1
row2
row3
row4
row5
row6
how can I tell to VBA that if it is an empty row to declare Myarr without that row
Dim MyArr As Variant
MyArr = Application.WorksheetFunction.Transpose(ThisWorkbook.Sheets("Headers").Range("B14", Cells(LastRowNume, 2).Address).SpecialCells(xlCellTypeConstants))
but if I have a empty row between the rows then I received error 1004 ..unable to get the transpose ..etc
ex.
row1
row2
'empty row
row4
row5
row6
when I have no empty row between rows everything is ok
row1
row2
row3
row4
row5
row6
how can I tell to VBA that if it is an empty row to declare Myarr without that row