Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default two procedures in the same sheet one a workbook even procedure

I have two procedures in the same sheet.

I have a commandbutton in a sheet with code in a general module necessating
selecting a cell which is also the target in the workbook event procedure
given below.

I have another procedure which is workbook event as follows
Workbook_SheetSelectionChange(ByVal sh As Object, ByVal target As Range)

now if I click the commandbutton it goes into the workbook event and due to
error the code stops.

Neither the command button code nor the work book event is executed

when I click command button I DONT WANT the workbook procedure to operate at
all.

hoope I made myself clear

any solutions?




  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27
Default two procedures in the same sheet one a workbook even procedure

Hello
Add in first line of your command button code the following:
Application.EnableEvents = False
And remember to set it back to True:
Application.EnableEvents = True

HTH
Cordially
Pascal

"R.VENKATARAMAN" &&& a écrit dans le message de
...
I have two procedures in the same sheet.

I have a commandbutton in a sheet with code in a general module

necessating
selecting a cell which is also the target in the workbook event procedure
given below.

I have another procedure which is workbook event as follows
Workbook_SheetSelectionChange(ByVal sh As Object, ByVal target As Range)

now if I click the commandbutton it goes into the workbook event and due

to
error the code stops.

Neither the command button code nor the work book event is executed

when I click command button I DONT WANT the workbook procedure to operate

at
all.

hoope I made myself clear

any solutions?






  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default two procedures in the same sheet one a workbook even procedure

thanks.shall try that.

papou wrote in message
...
Hello
Add in first line of your command button code the following:
Application.EnableEvents = False
And remember to set it back to True:
Application.EnableEvents = True

HTH
Cordially
Pascal

"R.VENKATARAMAN" &&& a écrit dans le message de
...
I have two procedures in the same sheet.

I have a commandbutton in a sheet with code in a general module

necessating
selecting a cell which is also the target in the workbook event

procedure
given below.

I have another procedure which is workbook event as follows
Workbook_SheetSelectionChange(ByVal sh As Object, ByVal target As Range)

now if I click the commandbutton it goes into the workbook event and due

to
error the code stops.

Neither the command button code nor the work book event is executed

when I click command button I DONT WANT the workbook procedure to

operate
at
all.

hoope I made myself clear

any solutions?








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
Slow to Open, Small Workbook <2MB, HTML Paste, VBA procedures Fred Excel Discussion (Misc queries) 0 February 5th 10 09:20 PM
Simplifying numerous checkbox procedures into 1 procedure PJ Murph[_2_] Excel Worksheet Functions 2 March 21st 09 09:32 PM
Help with workbook procedure CC Excel Worksheet Functions 0 January 7th 08 05:37 PM
Calling Procedures from another excel sheet by passing objects Thomas Auburn Excel Programming 0 May 5th 04 05:33 PM


All times are GMT +1. The time now is 02:17 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"