View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Inserting rows from a command button

Selection.EntireRow.Insert

--
Regards,
Tom Ogilvy

"jontait " wrote in message
...
Hi all

I'd like users to be able to insert rows into my protected worksheet
witghout having to unprotect it first.

Therefore I've got a command button on the sheet and I'd like it to
when clicked:

1. unprotect the sheet using my password "jon"
2. insert rows for me (I've already asked the user to select the rows
he's like to have inserted, i.e. selected using the row numbers on the
left of the screen. For example if they want to insert a copy of row 4
through 7 below row 7 then they have selected rows 4-7 and they have
turned black)
3. protect the sheet again using my password "jon"

I've got the following so far, but don't know what to put in the middle
to make the INSERT ROWS bit happen.

CommandButton1.TakeFocusOnClick = False
ActiveSheet.Unprotect Password:="jon"
--WHAT DO I PUT IN HERE??--
ActiveSheet.Protect Password:="jon"

Any ideas?? Many thanks in advance for your help

Jon


---
Message posted from http://www.ExcelForum.com/