Worksheet_SelectionChange stopped working

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I've been using this function for a long time but it has suddenly stopped
working.
I made sure events are enabled with Application.EnableEvents = True
My test code is simply:
Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
Debug.Print "x"
Debug.Print Target.Address
End Sub
I tried several existing workbooks and new workbooks but still nothing.
I found nothing in the Microsoft knowledge base either.
I'm using Excel 2002 SP3-any ideas?
 
Mike,
Are you in Design Mode ?
Toggle the "set square & ruler" icon on the controls tool bar.

NickHK
 
Mike,
Well, if EnableEvents is true and no design mode, are you sure that code is
on the WS you changing selection ?

NickHK
 
Try re-creating the code from scratch in that worksheet. You should see that
by using the dropdowns in the code pane to setup the procedure signature,
Target will be As Range not Excel.Range.

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
Hi Bob,

'----------------
Try re-creating the code from scratch in that worksheet. You should see that
by using the dropdowns in the code pane to setup the procedure signature,
Target will be As Range not Excel.Range.
'----------------

For me, the event procedure works either defining Target
as a range or an Excel.Range and, subject to the conditions
outlined by Nick, I experienced no problem with Mike's code
 
I know Norman, and nor do I, but he certainly seems to. I was just trying to
get him to make sure it was entered using VBA to outline it, and in the
correct module.

Congrats on the award BTW, just noticed the other day.

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
Hi Bob,

'----------------
I know Norman, and nor do I, but he certainly seems to. I was just trying to
get him to make sure it was entered using VBA to outline it, and in the
correct module.
'----------------

I agree. It is good advice to use the code pane dropdowns.


'----------------
Congrats on the award BTW, just noticed the other day.
'----------------

Thank you!
 
When was it, recently? Why do you add it to the signature in .it but not
here? Can I welcome you publicly in the other place?

Regards

Bob
 
Hi Bob,
When was it, recently?

I was formally notified on April Fools day!
Why do you add it to the signature in .it but not here?

I have used the signature in the Italian newsgroup because it
is conventional to do so there; in this group, the convention
appears less observed!
Can I welcome you publicly in the other place?

Certainly, I would regard it as an honour1
 
Bob Phillips ha scritto:
When was it, recently? Why do you add it to the signature in .it but not
here? Can I welcome you publicly in the other place?

Regards

Bob

[CUT]

Hi Bob,
I am a user of the Italian NG and I believe that would be a great
honour for "the other place" to welcome you, not only for the
congratulations due to Norman for MVP nomination, but also to benefit
from your knowledge, for which I want to thank you in advance.
Sorry for my poor English and regards,
Eliano
 
Thank you Eliano. I only wish I had good Italian so that I could contribute
to that group. But when I mentioned the other place, I was referring to a
private group that Norman now has access to.

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

eliano said:
Bob Phillips ha scritto:
When was it, recently? Why do you add it to the signature in .it but not
here? Can I welcome you publicly in the other place?

Regards

Bob

[CUT]

Hi Bob,
I am a user of the Italian NG and I believe that would be a great
honour for "the other place" to welcome you, not only for the
congratulations due to Norman for MVP nomination, but also to benefit
from your knowledge, for which I want to thank you in advance.
Sorry for my poor English and regards,
Eliano
 
Hello Bob and Norm,
Thanks for the efforts. I initially used the drop down to set up the code.
When it stopped working I saw a ref to Excel.Range instead of Range in one
of the support articles so I blindly tried that. It appears that none of the
event subs are running even though events are enabled.
Mike A. Bruner
 
Hi Mike,

'------------------
Hello Bob and Norm,
Thanks for the efforts. I initially used the drop down to set up the code.
When it stopped working I saw a ref to Excel.Range instead of Range in one
of the support articles so I blindly tried that. It appears that none of
the
event subs are running even though events are enabled.
'------------------

If you wish, you may send me the problematic workbook

norman_jones@NOSPAMbtconnectDOTcom

(Delete "NOSPAM" and replace "DOT" with a full stop [period] )
 
Hi Bob, I understand; sorry for my mistake, but naturally the invite
is always valid for you.
Regards
Eliano
 

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

Back
Top