Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Could someone show me where I am going wrong.
[In "ThisWorkbook"] Private Sub Workbook_Open() Dim RowsEnd As Double Dim Target As Range RowsEnd = Cells(.Rows.Count, "E").End(xlUp).Row 'Not certain if correct Target = "D27:F" & (RowsEnd + 25) 'Unsure if this will call Worksheet_Change Worksheet_Change(Target as Range). End Sub Private Sub Worksheet_Change(Target as Range) With Sheets("Sheet4") For n = 2 To RowsEnd .Cells(n, 5) = .cell((n - 1), 5) + .cell(n, 6) - .cell(n, 4) Next n End With End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
VBA - passing Variables to subroutines | Excel Discussion (Misc queries) | |||
Calling subroutines and passing variables | Excel Programming | |||
Calling subroutines and passing variables | Excel Programming | |||
Passing a Range | Excel Programming | |||
passing range to c# | Excel Programming |