If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Excel > help with Sub Worksheet_Change(ByVal Target As Range)

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-03-07, 08:05
Bartron Bartron is offline
Registered User
 
Join Date: Feb 2007
Location: The Farm
Posts: 35
help with Sub Worksheet_Change(ByVal Target As Range)

I don't understand how you specify Target. The description suggest that Target can be a cell or range of cells so I assume there is a way to specify what you want. All the examples I have found assume the reader understands that part. I do not.

What I want to do is recalculate when a particular row changes. Perhaps an example of a valid test to show it is working would be helpful also.

Thanks.
__________________
Bartron

Liv'n down on the cube farm. Left, then another left, then right.
Reply With Quote
  #2 (permalink)  
Old 05-03-07, 08:16
pootle flump pootle flump is offline
King of Understatement
 
Join Date: Feb 2004
Location: One Flump in One Place
Posts: 14,905
Moving to Excel forum - let me know if I missed something.
__________________
Testimonial:
Quote:
pootle flump
ur codings are working excelent.
Reply With Quote
  #3 (permalink)  
Old 05-03-07, 09:42
Bartron Bartron is offline
Registered User
 
Join Date: Feb 2007
Location: The Farm
Posts: 35
Did I create in the wrong forum? Sorry.
__________________
Bartron

Liv'n down on the cube farm. Left, then another left, then right.
Reply With Quote
  #4 (permalink)  
Old 05-03-07, 09:44
Bartron Bartron is offline
Registered User
 
Join Date: Feb 2007
Location: The Farm
Posts: 35
Still need help with WorkSheet_Change

Attempting to re-signal need for help.
__________________
Bartron

Liv'n down on the cube farm. Left, then another left, then right.
Reply With Quote
  #5 (permalink)  
Old 05-04-07, 03:09
MikeTheBike MikeTheBike is offline
Registered User
 
Join Date: Apr 2004
Location: Derbyshire, UK
Posts: 714
Hi

Target is the range object of the currently selected/active Cell/Range when the worksheet that the module is in changes.

ie

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
    MsgBox Target.Address
End Sub
will display the address of the cell that has been changed, or the top left cell if it is a range of more that one cell.

Hope that makes sense.



MTB


EDIT: and MsgBox Target.Row displays the current row number.
Reply With Quote
  #6 (permalink)  
Old 05-07-07, 08:26
pootle flump pootle flump is offline
King of Understatement
 
Join Date: Feb 2004
Location: One Flump in One Place
Posts: 14,905
Quote:
Originally Posted by Bartron
Did I create in the wrong forum? Sorry.
No probs
__________________
Testimonial:
Quote:
pootle flump
ur codings are working excelent.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On