Remember:
In MS Excel 97 to MS Excel 2003 .........[Files Saved As: *.xls]
.... Maximum: Rows = 65,365 | Columns = 256 (Column: 'IV')
In MS Excel 2007 to 2010 ................[Files Saved As: *.xlsx]
.... Maximum: Rows = 1,048,576 | Columns = 16,384 (Column: 'XFD')
(Reference: 'http://office-watch.com/t/n.aspx?a=1408')
So make sure you don't miss Dim your variable types, and wind up capping yourself. Just use the largest type you know you will need. ie. If your NOT going to use all of the rows in Excel, integer should be fine upto 32,768 rows. Otherwise you could run into a buffer overflow.)
.... Byte .... is ... (0 to 255) ...................... [Size: 1 byte] Less memory used.
.... Integer . is ... (-32,768 to 32,768) ............. [Size: 2 bytes]More memory used.
.... Long .... is ... (-2,147,483,648 to 2,147,483,648) [Size: 4 bytes]Even More memory used.