Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Selection Change question

Joe,

The Target parameter passed to the SelectionChange and Change
events is a Range reference that refers to the cell(s). From your
description, I think you want to use the Change event rather than
the SelectionChange event. E.g.,

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$A$1" Then
MsgBox "You entered: " & Target.Value
End If
End Sub


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Joe" wrote in message
...
How do I determine what cell information was entered into using

the
worksheet SelectionChange Sub? I am trying to use VBA to

validate and
change a number when info is entered into a cell in a certain

range. Any
help is greatly appreciated.

Joe




  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Selection Change question

Joe,

Do you mean the events of a worksheet? If so, just open the code
module of the worksheet (where you put the code), and go to the
left drop down at the top of the code window and choose Worksheet.
All of the available events will be listed in the right drop down
box.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com

"Joe" wrote in message
...
Chip,

Thanks for your help on this. It was starting to drive me nuts.
Now I am playing around with this little treasure like a kid in

a toy store.
:)

Do you know where I could find a list of these worksheet

functions?

Thanks again!

Joe


"Chip Pearson" wrote in message
...
Joe,

The Target parameter passed to the SelectionChange and Change
events is a Range reference that refers to the cell(s). From

your
description, I think you want to use the Change event rather

than
the SelectionChange event. E.g.,

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$A$1" Then
MsgBox "You entered: " & Target.Value
End If
End Sub


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Joe" wrote in message
...
How do I determine what cell information was entered into

using
the
worksheet SelectionChange Sub? I am trying to use VBA to

validate and
change a number when info is entered into a cell in a

certain
range. Any
help is greatly appreciated.

Joe








  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Selection Change question

Chip,

Thanks for your help on this. It was starting to drive me nuts.
Now I am playing around with this little treasure like a kid in a toy store.
:)

Do you know where I could find a list of these worksheet functions?

Thanks again!

Joe


"Chip Pearson" wrote in message
...
Joe,

The Target parameter passed to the SelectionChange and Change
events is a Range reference that refers to the cell(s). From your
description, I think you want to use the Change event rather than
the SelectionChange event. E.g.,

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$A$1" Then
MsgBox "You entered: " & Target.Value
End If
End Sub


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Joe" wrote in message
...
How do I determine what cell information was entered into using

the
worksheet SelectionChange Sub? I am trying to use VBA to

validate and
change a number when info is entered into a cell in a certain

range. Any
help is greatly appreciated.

Joe






  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 550
Default Selection Change question

Joe,

And if you want a really great explanation of all the events,
there's a guy named Chip Pearson that has them on his website.
You can find them he
http://www.cpearson.com/excel/events.htm

He's got lot's of other great stuff there too.

John

Chip Pearson wrote:

Joe,

Do you mean the events of a worksheet? If so, just open the code
module of the worksheet (where you put the code), and go to the
left drop down at the top of the code window and choose Worksheet.
All of the available events will be listed in the right drop down
box.

--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com

"Joe" wrote in message
...
Chip,

Thanks for your help on this. It was starting to drive me nuts.
Now I am playing around with this little treasure like a kid in

a toy store.
:)

Do you know where I could find a list of these worksheet

functions?

Thanks again!

Joe


"Chip Pearson" wrote in message
...
Joe,

The Target parameter passed to the SelectionChange and Change
events is a Range reference that refers to the cell(s). From

your
description, I think you want to use the Change event rather

than
the SelectionChange event. E.g.,

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$A$1" Then
MsgBox "You entered: " & Target.Value
End If
End Sub


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Joe" wrote in message
...
How do I determine what cell information was entered into

using
the
worksheet SelectionChange Sub? I am trying to use VBA to
validate and
change a number when info is entered into a cell in a

certain
range. Any
help is greatly appreciated.

Joe







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
VBA range selection question Pete[_7_] Excel Worksheet Functions 24 May 10th 11 07:29 PM
Quick VBA Worksheet Change Event or Selection Question: Damil4real Excel Worksheet Functions 6 November 17th 09 10:28 PM
Filter and selection question tjcmills Excel Discussion (Misc queries) 1 April 2nd 09 11:59 AM
A cell selection question jezzica85 Excel Discussion (Misc queries) 1 April 8th 06 12:40 AM
Change row selection Farrel Excel Worksheet Functions 7 July 13th 05 06:58 PM


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