Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Greetings:
Am trying to use the following as part of an existing process to copy down formulas placed in G2 and I2, to variable length columns. When trying to CALL the Private Sub, I get Error messages as detailed under each CALL line: ' Copy formulas in G2 and I2 down thru to last used Row Call Worksheet_Change ' Creates Compile Error: Argument not Optional Call Worksheet_Change(ByVal Target As Range) ' Creates Compile Error: List seperator or ) End Sub The following is the code I got from this group. I understand what it is supposed to do. Hopefully it works OK when the CALL problem is resolved. Private Sub Worksheet_Change(ByVal Target As Range) Dim LRow As Long If Target.Column = 1 Then LRow = Cells(Rows.Count, 1).End(x1Up).Row Application.EnableEvents = False Range("G2").AutoFill Destination:=Range("G3:G" & LRow) Range("I2").AutoFill Destination:=Range("I3:I" & LRow) Application.EnableEvents = True End If End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Autosum a variable column length using VB | Excel Programming | |||
Sum a Column of Variable length | Excel Discussion (Misc queries) | |||
Sum a column of variable length? | Excel Discussion (Misc queries) | |||
Continuing Difficulties W/ Sum For Variable-length Column | Excel Programming | |||
Averaging a variable length column | Excel Programming |