D
DavidObeid
A quick question.
If I write a formula in a cell (say A1) (with or without absolute
references) that uses a range of cells for its argument (eg
=sum(a2:a5)) and I delete a row (say row 3) from my sheet (using
Alt+E+D+R), then my formula will automatically adjust to show the range
altered to a2:a4.
My question is, if I have VBA code written for a sheet, can Excel make
modifications to the VBA code automatically if a row deletion/insertion
takes place? If so, how do I turn this option on?
My code (and coding ability) is very simple:
Public Sub DataCollectionForSpotthedot()
Range("c9").Select
ActiveCell.Value = InputBox("Enter the name of the task")
Range("b13").Select
ActiveCell.Value = InputBox("Enter the 'out of' mark for the task")
Range("A12").Select
ActiveCell.Value = InputBox("Enter the lower cut off for marks you want
displayed on your graph")
Range("A15").Select
End Sub
Regards,
Dave
If I write a formula in a cell (say A1) (with or without absolute
references) that uses a range of cells for its argument (eg
=sum(a2:a5)) and I delete a row (say row 3) from my sheet (using
Alt+E+D+R), then my formula will automatically adjust to show the range
altered to a2:a4.
My question is, if I have VBA code written for a sheet, can Excel make
modifications to the VBA code automatically if a row deletion/insertion
takes place? If so, how do I turn this option on?
My code (and coding ability) is very simple:
Public Sub DataCollectionForSpotthedot()
Range("c9").Select
ActiveCell.Value = InputBox("Enter the name of the task")
Range("b13").Select
ActiveCell.Value = InputBox("Enter the 'out of' mark for the task")
Range("A12").Select
ActiveCell.Value = InputBox("Enter the lower cut off for marks you want
displayed on your graph")
Range("A15").Select
End Sub
Regards,
Dave