EE Pros,
I have a Macro that automatically replicates lines in a WS. I need it to stop by either a counter or a specific cell reference. So for example, I'd like to be able to specify that it can increment a total of 10 times or until it reaches say, Cell A17. The choices should be able to operate independently and I'll comment out the choice.
Thank you in advance.
B.
'This code adds a new Case to the end of the last case.
Sub NewCase()
Dim rngNewCase As Range
Dim cht As ChartObject
Dim rngCurrent As Range
Dim rngDesired As Range
ActiveSheet.Unprotect Password:="pass"
Application.DisplayAlerts = False
Set rngNewCase = ActiveSheet.Range("A" & Rows.Count).End(xlUp).Offset(1)
Worksheets("Risk_Return").Range("Priority_Case").Copy rngNewCase
ChartNo = rngNewCase.Row / 3
Set rngCurrent = rngNewCase.Offset(, 2)
Set rngDesired = rngNewCase.Offset(, 3)
ActiveSheet.Protect Password:="pass"
ActiveSheet.EnableSelection = xlUnlockedCells
End Sub
I am not clear what you want to do now. Can you give an example?