Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Certain methods, such as Cells.EntireRow.Hidden, stop VBA subrouti

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?


  #2   Report Post  
Posted to microsoft.public.excel.programming
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?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Certain methods, such as Cells.EntireRow.Hidden, stop VBA subr

Chip,
There are two cases for code initiation. One is a button control that I
have placed on a sheet, the other is a custom menu that I have added to the
menu bar. In either case the execution does not involve a worksheet cell.

Mark

"Chip Pearson" wrote:

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?


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 298
Default Certain methods, such as Cells.EntireRow.Hidden, stop VBA subr

Do you have any error handling in your routine?
What setting do you have in the VBE under Tools Options General Error
tracking ?

Tim



"mrbarritt" wrote in message
...
Chip,
There are two cases for code initiation. One is a button control that I
have placed on a sheet, the other is a custom menu that I have added to
the
menu bar. In either case the execution does not involve a worksheet cell.

Mark

"Chip Pearson" wrote:

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?




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Certain methods, such as Cells.EntireRow.Hidden, stop VBA subr

For this routine, I do not have any custom error handling.

Error Tracking is set to "Break on Unhandled Errors"

Again, I get no indication that there has been an error, no msg box with the
run time error number etc. The procedure simply stops and does not execute
the next statement.


"Tim Williams" wrote:

Do you have any error handling in your routine?
What setting do you have in the VBE under Tools Options General Error
tracking ?

Tim



"mrbarritt" wrote in message
...
Chip,
There are two cases for code initiation. One is a button control that I
have placed on a sheet, the other is a custom menu that I have added to
the
menu bar. In either case the execution does not involve a worksheet cell.

Mark

"Chip Pearson" wrote:

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?







Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't set the Entirerow.Hidden property. Jeremy Excel Programming 3 March 21st 07 04:52 PM
Macros cells.EntireRow.Hidden = True and Range.Sort are stopping Adrian Excel Programming 0 March 22nd 06 01:59 AM
Entirerow.delete based on multiple cells tom[_7_] Excel Programming 5 December 15th 05 09:25 PM
Hidden workbook properties/methods R Avery[_2_] Excel Programming 1 May 23rd 05 07:33 PM
EntireRow.Hidden Jonas Haettner Excel Programming 1 October 24th 03 09:19 AM


All times are GMT +1. The time now is 11:58 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"