Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 2 Private Sub Worksheet_SelectionChange?

I already have 1 Private Sub Worksheet_SelectionChange(ByVal Target As Range)
which allows a combo box to appear on a validation list, but I want to add
another "SelectionChange" to allow a cell to always show the current cell a
cursor is in.

The macro falls over - ambiguous name - I presume you cannot have two
Private Sub Worksheet_SelectionChange(ByVal Target As Range) named the same
in 1 sheet.

Is there a way around this - renaming one does not seem to work.

Sorry but my knowledge of VBA is extremely limited.

Thanks


Andrew
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 2 Private Sub Worksheet_SelectionChange?

Put both activities in the same single SelectionChange procedure.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
' combobox code

' other code
Range("A1").Value = Target.Address
end Sub

--
Regards,
Tom Ogilvy


"AJPendragon" wrote in message
...
I already have 1 Private Sub Worksheet_SelectionChange(ByVal Target As

Range)
which allows a combo box to appear on a validation list, but I want to add
another "SelectionChange" to allow a cell to always show the current cell

a
cursor is in.

The macro falls over - ambiguous name - I presume you cannot have two
Private Sub Worksheet_SelectionChange(ByVal Target As Range) named the

same
in 1 sheet.

Is there a way around this - renaming one does not seem to work.

Sorry but my knowledge of VBA is extremely limited.

Thanks


Andrew



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
re : Possible to run private sub macros by writing another private ddiicc Excel Programming 5 August 26th 05 04:49 AM
Private Sub Running Other Private Sub Inadvertently Ross Culver Excel Programming 2 February 10th 05 07:17 PM
Private Sub Worksheet_SelectionChange(ByVal Target As Range) Arturo Excel Programming 2 January 7th 05 06:59 PM
Worksheet_SelectionChange mangesh_yadav[_143_] Excel Programming 1 October 25th 04 11:49 AM
Worksheet_SelectionChange Rasmus[_2_] Excel Programming 2 June 27th 04 07:19 PM


All times are GMT +1. The time now is 10:18 PM.

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

About Us

"It's about Microsoft Excel"