View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Chip Pearson Chip Pearson is offline
external usenet poster
 
Posts: 7,247
Default Certain methods, such as Cells.EntireRow.Hidden, stop VBA subrouti

Are these lines of code being executed in a VBA procedure that is
directly or indirectly called from a worksheet cell? If so, that is
the problem. Code initiated by a worksheet cell cannot make any
changes to the Excel environment.

Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group, 1998 - 2009
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)



On Wed, 2 Sep 2009 16:54:19 -0700, rarity
wrote:

I have been noticing that when using VBA in Excel, certain methods can cause
the termination of a subroutine without any warning. Some of these a

Cells.EntireRow.Hidden
Range("O3:AQ3").MergeCells = False
Columns("AD").Insert Shift:=xlToRight, CopyOrigin:=Null

Has anyone else had a similiar experience or know why?