View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Rafael_SP[_2_] Rafael_SP[_2_] is offline
external usenet poster
 
Posts: 3
Default Restrict area where I can use button with macro

Hi, everybody.

I'm trying to implement two macros associated with two respective buttons.
The first button ("Add Row") adds rows and copies the formulae and format
from the row immediately above.
The second one ("Delete Row") deletes the row the cursor is on.

However, I'd like to restrict the area where I can use these 2 buttons.
I want my worksheet to start with only one row (row 7, containing the
formulae and format) where I can use the button "Add Row" (the "Delete Row"
button shouldn't work with row 7).
Let's say the user adds 3 more rows (8, 9, 10). Then, the buttons should
work whenever I place the cursor on any of these new rows and hit the
buttons. They shouldn't work anywhere else.

Just to emphasize, row 7 cannot be deleted, for it contains the formulae and
format.

How can I accomplish that? Can anybody help me?

Thanks in advance.