#1
|
|||
|
|||
Stop macro "IF"
I am using an Insert Row macro from "Gary L Brown 2001" but trying to prevent the macro from executing if the Active Cell is in the spreadsheet header.
What I am looking for is a statement that: if the Active Cell is above (A6) then end. Any suggestions?? |
#2
|
||||
|
||||
How about something like this:
Code:
If ActiveCell.Row < 6 Then Exit Sub End If |
#3
|
|||
|
|||
Thanks, this is exactly what I was looking for!
I guessed all around it. The macro (attached to an object) now inserts rows (user specified number) below the active cell (now excluding the header) and then fills in the formulas allowing for a one click update to "grow" the number of rows as needed. I don't see a way to mark this solved - but it is. |
Tags |
activecell, excel 2010, macro |
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Macro to print "Current Page" in Word 2010 | Jshopping | Word VBA | 10 | 06-08-2012 01:15 AM |
How to choose a "List" for certain "Heading" from "Modify" tool? | Jamal NUMAN | Word | 2 | 07-03-2011 03:11 AM |
Launch macro sub after hitting "create pdf" button in word | webharvest | Word VBA | 1 | 06-29-2011 04:56 PM |
Can I stop the right click "move here" feature? | BillAnderson | PowerPoint | 0 | 04-16-2011 02:42 PM |
How to stop "replace"'ing new words (in desperate need of advice) | bme081 | Word | 6 | 11-02-2009 05:57 AM |