Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Good evening all.
Re-posted again from misc. - sorry again.(RDB) I am learning the usefulness of the Sub Worksheet_Change(ByVal Target As Range) However I cannot seem to resolve the fact that I do not seem to be allowed to have more than one of these subroutines in the same worksheet, even though they do different things and have different Target Values and/or Ranges. Am I missing something fundamental here? I have tried naming the sub differently, ie with Sub Worksheet2_Change(ByVal Target As Range) or Sub Worksheet_Change2(ByVal Target As Range).. etc, but to no avail. Is this possible, or do I have to combine all my requirements into one sub? Thank you to Ron De Bruin for his post in misc. but I am really non-the-wiser. my code: Private Sub Worksheet_Change(ByVal Target As Range) If Target.Count 1 Then Exit Sub If Not Application.Intersect(Range("AJ:AK"), Target) Is Nothing Then If Target.Value = "t" Then Target.Value = Now End If End If End Sub I would like to repeat this in the same worksheet, for different ranges, and for different target values then different date, ie next friday (for which I have code from Tom O.) Assistance required, sorry RDB. Mathew --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.554 / Virus Database: 346 - Release Date: 20/12/2003 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
REPSOT?? Sub Worksheet_Change(ByVal Target As Range) | Excel Discussion (Misc queries) | |||
Multiple values in Private Sub Worksheet_Change(ByVal Target As R | Excel Discussion (Misc queries) | |||
Control Toolbox and Private Sub Worksheet_Change(ByVal Target As R | Excel Discussion (Misc queries) | |||
Control Toolbox and Private Sub Worksheet_Change(ByVal Target As R | Excel Discussion (Misc queries) | |||
Private Sub Worksheet_Change(ByVal Target As Excel.Range) | Excel Worksheet Functions |