Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Can't set the Entirerow.Hidden property. | Excel Programming | |||
Macros cells.EntireRow.Hidden = True and Range.Sort are stopping | Excel Programming | |||
Entirerow.delete based on multiple cells | Excel Programming | |||
Hidden workbook properties/methods | Excel Programming | |||
EntireRow.Hidden | Excel Programming |