View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
IanKR IanKR is offline
external usenet poster
 
Posts: 97
Default Error 1004 on VBA operation

Hello, folks. I'm getting an error : "Run-time error '1004':
Application-defined or object-defined error" when I get to the
following line:

Set ActualsActualsRange = ActiveWorkbook.Worksheets("Actuals-
Sheet").Range(Cells(5, 12), Cells(5, 500))

Any idea what's wrong with this? It looks like a properly-formed
range, and pretty explicitly referenced.


Which version of Excel are you running? I use Excel 2003 and there are only
256 columns in a worksheet, so I get that error because a range with a cell
in column 500 at its bottom right corner is impossible. But perhaps you're
using Excel 2007 and that might have enough columns on a worksheet, in which
case it's something else that's causing the problem...