Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 43
Default Is there a do not call function?

For some reason a function is calling this:
Worksheet_SelectionChange(ByVal Target As Range)

I don't want it to call this function. Is there a way to make it so it
doesn't call this function if there is a selection change?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,118
Default Is there a do not call function?

In the Sheet Module containing the code:
Either
1) comment out that event code
or
2) delete it

Does that help?
--------------------------

Regards,

Ron
Microsoft MVP (Excel)
(XL2003, Win XP)

"pokdbz" wrote in message
...
For some reason a function is calling this:
Worksheet_SelectionChange(ByVal Target As Range)

I don't want it to call this function. Is there a way to make it so it
doesn't call this function if there is a selection change?



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7,247
Default Is there a do not call function?

Excel will automatically call the Worksheet_SelectionChange procedure when
the selection is changed (e.g., by clicking on a cell) either manually or by
other code. You can prevent event procedures from running with the
Application.EnableEvents property.

Application.EnableEvents = False
'
' your code here
'
Application.EnableEvents = True

However, it is very rarely required that you Select anything when working
with VBA. Instead, you can reference a range directly. For example,

Instead of
Range("A10").Select
Selection.Font.Bold = True

Use
Range("A10").Font.Bold = True


--
Cordially,
Chip Pearson
Microsoft MVP - Excel, 10 Years
Pearson Software Consulting
www.cpearson.com
(email on the web site)


"pokdbz" wrote in message
...
For some reason a function is calling this:
Worksheet_SelectionChange(ByVal Target As Range)

I don't want it to call this function. Is there a way to make it so it
doesn't call this function if there is a selection change?


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
Don't know what to call the type of function I need Kasey Excel Worksheet Functions 4 December 8th 06 04:47 PM
how can i call sub or function in vba code xxx Excel Discussion (Misc queries) 3 June 28th 06 11:47 AM
Custom Function Call Bill Martin -- (Remove NOSPAM from address) Excel Discussion (Misc queries) 5 September 6th 05 06:14 PM
how i can call the function reneabesmer Excel Worksheet Functions 2 May 2nd 05 12:13 PM
How to call a function from another workbook Joe Excel Discussion (Misc queries) 4 November 26th 04 03:49 PM


All times are GMT +1. The time now is 02:08 PM.

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"