I have this Excel spreadsheet/workbook that parses through some data and creates another condensed spreadsheet. The problem is when the sheet has more than 255 columns. When the line of VBA code at the bottom is run, it returns 1, rather than 258. It seems as though the VBA script that I am working on is made for the older version of Excel, right? What do I have to do to get this to work properly?
Excel.Worksheet.Cells(1, MySheet.Columns.Count).End(xlToLeft).Column returns 1 when there are more than 255 columns
Excel.Worksheet.CellsandMySheet.Columns.Countactually refer to different worksheets. It should probably read:MySheet.Cells(1, MySheet.Columns.Count).....