Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 108
Default Private Sub Worksheet_Change(ByVal Target As Excel.Range)

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Target.Address = "$D$11" Then
MsgBox Sell
End If
End Sub

Is there a way to stipulate multiple target addresses?
"$D$11" Or $G$11 Then... does not work.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Private Sub Worksheet_Change(ByVal Target As Excel.Range)

Try something like the following:

Private Sub Worksheet_Change(ByVal Target As Range)
If Not Application.Intersect(Target, Range("A1,B2,C3")) _
Is Nothing Then
MsgBox "Sell"
End If
End Sub


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


"Arturo" wrote in message
...
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Target.Address = "$D$11" Then
MsgBox "Sell"
End If
End Sub

Is there a way to stipulate multiple target addresses?
"$D$11" Or "$G$11" Then... does not work.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 108
Default Private Sub Worksheet_Change(ByVal Target As Excel.Range)

Thank You Chip,
Arturo

"Chip Pearson" wrote:

Try something like the following:

Private Sub Worksheet_Change(ByVal Target As Range)
If Not Application.Intersect(Target, Range("A1,B2,C3")) _
Is Nothing Then
MsgBox "Sell"
End If
End Sub


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


"Arturo" wrote in message
...
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Target.Address = "$D$11" Then
MsgBox "Sell"
End If
End Sub

Is there a way to stipulate multiple target addresses?
"$D$11" Or "$G$11" Then... does not work.




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Private Sub Worksheet_Change(ByVal Target As Excel.Range)

Hi Arturo,

You could just use an Orm but I use the Intersect method

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Not Intersect(Target, Range("D11,G11")) Is Nothing Then
MsgBox "Sell"
End If
End Sub


--

HTH

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


"Arturo" wrote in message
...
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Target.Address = "$D$11" Then
MsgBox "Sell"
End If
End Sub

Is there a way to stipulate multiple target addresses?
"$D$11" Or "$G$11" Then... does not work.



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 108
Default Private Sub Worksheet_Change(ByVal Target As Excel.Range)

Thank You Bob,
Arturo

"Bob Phillips" wrote:

Hi Arturo,

You could just use an Orm but I use the Intersect method

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Not Intersect(Target, Range("D11,G11")) Is Nothing Then
MsgBox "Sell"
End If
End Sub


--

HTH

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


"Arturo" wrote in message
...
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Target.Address = "$D$11" Then
MsgBox "Sell"
End If
End Sub

Is there a way to stipulate multiple target addresses?
"$D$11" Or "$G$11" Then... does not work.






  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 469
Default Private Sub Worksheet_Change(ByVal Target As Excel.Range)

new to this is there a way to use data in a cell ( have one column with pull
down menu that change entry in that cell with validation) plus other data in
row combined to trigger event. I have multiple worksheets in workbook. Trying
to have data from first worksheet copied to other as needed. Have suceeded in
doing one. Not sure of useing multiple cells in row to do job. most data is
text.
Seen this in search
If target .address<"$B$13" need to use for text
If Not Application.Intersect(Target, Range("A1,B2,C3")) _
Is Nothing Then (this is yous) _

call procedure
Would I use target range to call procedure I want to run?
A little direction would be appreciated
Going back to try
Thanks

"Chip Pearson" wrote:

Try something like the following:

Private Sub Worksheet_Change(ByVal Target As Range)
If Not Application.Intersect(Target, Range("A1,B2,C3")) _
Is Nothing Then
MsgBox "Sell"
End If
End Sub


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


"Arturo" wrote in message
...
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Target.Address = "$D$11" Then
MsgBox "Sell"
End If
End Sub

Is there a way to stipulate multiple target addresses?
"$D$11" Or "$G$11" Then... does not work.




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
Control Toolbox and Private Sub Worksheet_Change(ByVal Target As R [email protected] Excel Discussion (Misc queries) 1 August 17th 07 09:38 AM
Control Toolbox and Private Sub Worksheet_Change(ByVal Target As R Toppers Excel Discussion (Misc queries) 0 August 17th 07 02:02 AM
Control Toolbox and Private Sub Worksheet_Change(ByVal Target Toppers Excel Discussion (Misc queries) 0 August 17th 07 01:52 AM
Private Sub Worksheet_Change(ByVal Target As Excel.Range) [email protected] Excel Worksheet Functions 0 December 21st 06 02:13 AM
Private Sub Worksheet_Change(ByVal Target As Range) Arturo Excel Programming 1 May 25th 05 03:32 PM


All times are GMT +1. The time now is 02:58 AM.

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"