Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 143
Default On Cell change call

I am trying to call a sub whenever a single cell of a worksheet is changed.
I know how to do that whenever ANY cell on a worksheet is changed, but is
there a way to only call the sub when a SPECIFIC cell is changed.

For example, is cell 'b10" (labeled CRN) is changed, I want to call a sub,
on the same worksheet, called "FindCRN".

Can anyone give me any suggestions?

TIA,
Ken


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 111
Default On Cell change call

Try something similar to this in a Worksheet Change event:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$B$10" Then FindCRN
End Sub


--
Damon Longworth

Don't miss out on the 2005 Excel User Conference
Sept 16th and 17th
Stockyards Hotel - Ft. Worth, Texas
www.ExcelUserConference.com


"Ken Loomis" wrote in message
...
I am trying to call a sub whenever a single cell of a worksheet is changed.
I know how to do that whenever ANY cell on a worksheet is changed, but is
there a way to only call the sub when a SPECIFIC cell is changed.

For example, is cell 'b10" (labeled CRN) is changed, I want to call a sub,
on the same worksheet, called "FindCRN".

Can anyone give me any suggestions?

TIA,
Ken




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 143
Default On Cell change call

Thanks, Damon. That works well.

I am still laying out the user input worksheet, so I was hoping I could
change this:

If Target.Address = "$B$10" Then FindCRN

to

If Target.Address = "CRN" Then FindCRN

since 'CRN' is the label for that cell.

I tried that but it doesn't work. Is there a way to change that statement to
test to see if the call labeled "CRN" has been changed?

Or, will I just need to update the "$B$10" whenever I add rows or columns to
the finished spreadsheet.?

Ken
"Damon Longworth" wrote in message
...
Try something similar to this in a Worksheet Change event:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$B$10" Then FindCRN
End Sub


--
Damon Longworth

Don't miss out on the 2005 Excel User Conference
Sept 16th and 17th
Stockyards Hotel - Ft. Worth, Texas
www.ExcelUserConference.com


"Ken Loomis" wrote in message
...
I am trying to call a sub whenever a single cell of a worksheet is
changed. I know how to do that whenever ANY cell on a worksheet is
changed, but is there a way to only call the sub when a SPECIFIC cell is
changed.

For example, is cell 'b10" (labeled CRN) is changed, I want to call a
sub, on the same worksheet, called "FindCRN".

Can anyone give me any suggestions?

TIA,
Ken






  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default On Cell change call

If Not Intersect(Target, Range("CRN")) Is Nothing Then FindCRN


--

HTH

RP
(remove nothere from the email address if mailing direct)


"Ken Loomis" wrote in message
...
Thanks, Damon. That works well.

I am still laying out the user input worksheet, so I was hoping I could
change this:

If Target.Address = "$B$10" Then FindCRN

to

If Target.Address = "CRN" Then FindCRN

since 'CRN' is the label for that cell.

I tried that but it doesn't work. Is there a way to change that statement

to
test to see if the call labeled "CRN" has been changed?

Or, will I just need to update the "$B$10" whenever I add rows or columns

to
the finished spreadsheet.?

Ken
"Damon Longworth" wrote in message
...
Try something similar to this in a Worksheet Change event:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$B$10" Then FindCRN
End Sub


--
Damon Longworth

Don't miss out on the 2005 Excel User Conference
Sept 16th and 17th
Stockyards Hotel - Ft. Worth, Texas
www.ExcelUserConference.com


"Ken Loomis" wrote in message
...
I am trying to call a sub whenever a single cell of a worksheet is
changed. I know how to do that whenever ANY cell on a worksheet is
changed, but is there a way to only call the sub when a SPECIFIC cell is
changed.

For example, is cell 'b10" (labeled CRN) is changed, I want to call a
sub, on the same worksheet, called "FindCRN".

Can anyone give me any suggestions?

TIA,
Ken








  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 143
Default On Cell change call

Thanks, Bob.

That worked great.

Ken


"Bob Phillips" wrote in message
...
If Not Intersect(Target, Range("CRN")) Is Nothing Then FindCRN


--

HTH

RP
(remove nothere from the email address if mailing direct)


"Ken Loomis" wrote in message
...
Thanks, Damon. That works well.

I am still laying out the user input worksheet, so I was hoping I could
change this:

If Target.Address = "$B$10" Then FindCRN

to

If Target.Address = "CRN" Then FindCRN

since 'CRN' is the label for that cell.

I tried that but it doesn't work. Is there a way to change that statement

to
test to see if the call labeled "CRN" has been changed?

Or, will I just need to update the "$B$10" whenever I add rows or columns

to
the finished spreadsheet.?

Ken
"Damon Longworth" wrote in message
...
Try something similar to this in a Worksheet Change event:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$B$10" Then FindCRN
End Sub


--
Damon Longworth

Don't miss out on the 2005 Excel User Conference
Sept 16th and 17th
Stockyards Hotel - Ft. Worth, Texas
www.ExcelUserConference.com


"Ken Loomis" wrote in message
...
I am trying to call a sub whenever a single cell of a worksheet is
changed. I know how to do that whenever ANY cell on a worksheet is
changed, but is there a way to only call the sub when a SPECIFIC cell
is
changed.

For example, is cell 'b10" (labeled CRN) is changed, I want to call a
sub, on the same worksheet, called "FindCRN".

Can anyone give me any suggestions?

TIA,
Ken












  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default On Cell change call

Hi Ken,

One way:

Private Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo XIT
If Not Intersect(Target, Me.Range("CRN")) _
Is Nothing Then
Call FindCRN
End If
On Error GoTo 0
XIT:
End Sub

---
Regards,
Norman



"Ken Loomis" wrote in message
...
Thanks, Damon. That works well.

I am still laying out the user input worksheet, so I was hoping I could
change this:

If Target.Address = "$B$10" Then FindCRN

to

If Target.Address = "CRN" Then FindCRN

since 'CRN' is the label for that cell.

I tried that but it doesn't work. Is there a way to change that statement
to test to see if the call labeled "CRN" has been changed?

Or, will I just need to update the "$B$10" whenever I add rows or columns
to the finished spreadsheet.?

Ken
"Damon Longworth" wrote in message
...
Try something similar to this in a Worksheet Change event:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$B$10" Then FindCRN
End Sub


--
Damon Longworth

Don't miss out on the 2005 Excel User Conference
Sept 16th and 17th
Stockyards Hotel - Ft. Worth, Texas
www.ExcelUserConference.com


"Ken Loomis" wrote in message
...
I am trying to call a sub whenever a single cell of a worksheet is
changed. I know how to do that whenever ANY cell on a worksheet is
changed, but is there a way to only call the sub when a SPECIFIC cell is
changed.

For example, is cell 'b10" (labeled CRN) is changed, I want to call a
sub, on the same worksheet, called "FindCRN".

Can anyone give me any suggestions?

TIA,
Ken








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
How to call a cell ? Eric Excel Discussion (Misc queries) 3 December 10th 06 02:31 AM
Call Center Management: How to calculate 'cost per call' Denniso6 Excel Discussion (Misc queries) 2 June 25th 06 05:01 PM
How do I change a column label to call it what I want ? StardustDave New Users to Excel 3 April 25th 05 04:11 PM
How do I change a macro to call a sheet from another workbook Nic@Rolls-Royce[_7_] Excel Programming 2 February 9th 04 08:47 AM
How do I change a macro to call a sheet from another workbook Rob van Gelder[_4_] Excel Programming 0 February 9th 04 08:30 AM


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