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 stop procedure execution without notification

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: 5,600
Default Certain methods stop procedure execution without notification

If your code is in a UDF, called from a cell, code will simply stop if there
is an error (unless there is an error handler). Also UDFs cannot change the
interface as all the code you posted attempts to do (errors aside).

Regards,
Peter T

"mrbarritt" wrote in message
...
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: 9,101
Default Certain methods stop procedure execution without notification

change the VBA option to stop on all errors using the following menu

Tools - Opions - General - Break on all errors

I also recommend removing all ON ERROR statements until you get the code
working so yo cna actually find the real problems. the On Eror statements
often mask where the real errors arre occuring because excel doesn't break on
the actual statement where the error is occuring it will break some place
else in the code.

"Peter T" wrote:

If your code is in a UDF, called from a cell, code will simply stop if there
is an error (unless there is an error handler). Also UDFs cannot change the
interface as all the code you posted attempts to do (errors aside).

Regards,
Peter T

"mrbarritt" wrote in message
...
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
Certain methods, such as Cells.EntireRow.Hidden, stop VBA subrouti mrbarritt Excel Programming 4 September 14th 09 03:20 AM
why does the execution jump to another procedure? Harold Good Excel Programming 4 May 14th 09 02:21 PM
Stop Procedure when an Error occurs in another procedure RyanH Excel Programming 4 October 15th 08 08:11 PM
Time the Execution Speed of Procedure in Milliseconds RyanH Excel Programming 1 August 24th 08 10:44 PM
Blank Message Box after procedure execution [email protected] Excel Programming 7 June 1st 07 01:13 PM


All times are GMT +1. The time now is 07:19 AM.

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

About Us

"It's about Microsoft Excel"