help_for_excel
Board Regular
- Joined
- Feb 24, 2012
- Messages
- 72
I have a code which is giving me error.
(It is part of larger code)
Dim XData As Excel.Range
Dim nRow AS long
Dim nCol As long
.....
.....
For nRow = 1 To XData.Rows.Count
For nCol = 1 To XData.Columns.Count
.Cells(nRow, nCol) = XData.Cells(nRow, nCol)
When I de-bug code line by line, it gives error 438: Object doesn't support this property or method.
Help is much appreciated.
(It is part of larger code)
Dim XData As Excel.Range
Dim nRow AS long
Dim nCol As long
.....
.....
For nRow = 1 To XData.Rows.Count
For nCol = 1 To XData.Columns.Count
.Cells(nRow, nCol) = XData.Cells(nRow, nCol)
When I de-bug code line by line, it gives error 438: Object doesn't support this property or method.
Help is much appreciated.