View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson[_3_] Dave Peterson[_3_] is offline
external usenet poster
 
Posts: 2,824
Default Using a command button to insert a new row.

#1. A commandbutton from the Control Toolbox toolbar????

Option Explicit
Private Sub CommandButton1_Click()
Me.CommandButton1.TopLeftCell.Offset(-2, 0).EntireRow.Insert
End Sub


#2. Cells can be locked or unlocked. (Format|cells|Protection tab)
And when you're on that tab, you can see an option to hide the formula
in a locked cell. (just check both boxes)

But then you have to protect the sheet. Tools|Protection|Protect sheet

Be aware that this protection isn't very strong. There's code posted here every
week that will allow the curious to see your stuff.



Jared wrote:

Hello,

I have two questions, (I have no problem getting around Excel but this
is my first time tackleing the dynamic side of it)

First what I want to do is:

Use a command button to insert a row, two rows above the command
button. I have a worksheet that has many cells that need to be filled
in by the end user that need to be produced.

Second is:

Once I finish, what do I need to do to hide all my formulas and stuff,
so that nothing gets messed up by the user.

Thanks


--

Dave Peterson