disallowing insertion of rows

  • Thread starter Thread starter Nasir.Munir
  • Start date Start date
N

Nasir.Munir

Is there a way of disallowing users to insert a row. I just dont want
anyone to insert any row, becuase my sheet is hyperlinked with other
sheets. Any insertion will ruin the hyperlink. Can anyone suggest
something?
Thanks,
Nasir.
 
You can accomplish that with Protecting the worksheet. If you're using Excel
2003 you can cherry pick the options you want to allow your users to do.
 
Here is an option to disallow the menu bars items or insert/delete
you could put this in you in an auto_open module then as soon as the
spreadsheet opens these menu items are greyed out. I added delete
incase you need it too


Application.CommandBars("Cell").Reset
Application.CommandBars("Row").Reset
Application.CommandBars(1).Reset
Dim Ctrl As Office.CommandBarControl
For Each Ctrl In Application.CommandBars.FindControls(ID:=296) 'insert
from menu bar
Ctrl.Enabled = False
Next Ctrl
For Each Ctrl In Application.CommandBars.FindControls(ID:=478) ' delete
from menu bar
Ctrl.Enabled = False
Next Ctrl
Application.CommandBars("Row").FindControl(ID:=293).Enabled = False '
Delete from Row
Application.CommandBars("Row").FindControl(ID:=296).Enabled = False '
Insert From row
Application.CommandBars("Cell").FindControl(ID:=292).Enabled = False '
Insert from cell
Application.CommandBars("Cell").FindControl(ID:=295).Enabled = False '
Delete from cell
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top