![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Join Date: Jun 2003
Location: Ireland
Posts: 93
|
I am using the following macro...
ActiveSheet.Unprotect Password:="1234" 'Sub InsertRowIF>3() If Selection.Rows.Count > 1 Then Exit Sub ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True, Password:="1234" If ActiveCell.Row < 4 Then Exit Sub ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True, Password:="1234" ActiveSheet.Unprotect Password:="1234" ActiveCell.EntireRow.Insert ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True, Password:="1234" End Sub The problem is I have a rows A & B blank C with TOTALS .D..E..F £..... A..Blank..B..Blank..C..TOTALS..D..amount $..E..amount $..F..amount $.. I would like to know how to include in the above macro.....to end sub if the row with the above info on it is selected for a row insert....i.e. I do not want a row inserted on selection of row with TOTALS on it as it affects the formulas.. Any help much appreciated.... |
|
|
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|