Workaround to go beyond 256 max. column limit


Posted by NM on October 31, 2000 7:13 PM

When I programmatically write data using macros, I have hit the maximum limit of 256 columns (macro stops executing after reaching the limit).

The problem would get solved if I interchange rows and columns. That is, instead of writing across columns, I could write across rows. But that would require lot of code changes as there are references like
"TempAddr = Cells(RowId, ColumnIncrement).Address"

Is there any workaround that would solve this problem without requiring changing existing cell references? Something like, at the workbook/worksheet level, you could make some settings that would interchange the layout of rows and columns.

Thanks in advance.
-NM



Posted by Ivan Moala on October 31, 2000 11:56 PM

NM
If your data doesn't require the use of the entire
Column then you could programatically check when
it hits the 256 barrier and use an Offset to start
again @ Column1 BUT @ a safe offset to your data
range ie. below your current data.
If however you require the use of the entire
cloumn then I'm afraid you may have to revert to
using another sheet ??
Just a suggestion ?? (For something as large as
this appears then it may be advisable to use Access......


Ivan