View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Colo[_51_] Colo[_51_] is offline
external usenet poster
 
Posts: 1
Default excel97: runtime error 1004 select method of range class failed

Hi JMCN,

Sorry now I don't have 97....It may be a problem comes from forcus.
Insert "ActiveCell.Activate" before "Cells.Select" line.


Code
-------------------

ActiveCell.Activate
Cells.Select 'recevie runtime error 1004
Selection.Columns.AutoFit

-------------------


Or, simply don't select cells


Code
-------------------

Cells.Columns.AutoFit

-------------------


--
Message posted from http://www.ExcelForum.com