two procedures in the same sheet one a workbook even procedure

R

R.VENKATARAMAN

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?
 
P

papou

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

R.VENKATARAMAN

thanks.shall try that.

papou said:
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

operate
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top