Link to home
Start Free TrialLog in
Avatar of jeremyzit
jeremyzit

asked on

What is the maximum number of columns VB Script will read

What is the maximum number of columns VB Script will read data from? I've got a spread sheet that has data in 180 columns and it stops reading the data at the 120th column. It returns null for column 121 to 180.

sTest = Worksheets("TEST").Cells(iRow, 132)
Avatar of Qlemo
Qlemo
Flag of Germany image

This is VBA (Visual Basic for Application), not VBS (VB Script), as you are inside of Excel.
And there is no limitation on columns (besides the 65535 of less recent Excel releases).

Could you prepare an example sheet with a few rows, including the code you use to read?
ASKER CERTIFIED SOLUTION
Avatar of Bill Prew
Bill Prew

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Concur with the above.

An Excel 2003 or earlier worksheet has 256 columns, and an Excel 2007+ worksheet has 16,384 columns.

Assuming you have the right version of Excel and valid code, all columns are accessible from VBScript.
Avatar of jeremyzit
jeremyzit

ASKER

I'm using Excel 2003 and it's VBA coding that I'm using since it's inside excel. I was mistaken that it was vb script. I'll try to get an example sheet put on today along with some code.