Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Using a command button to insert a new row.

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Code for my Command Button to automatically copy and insert a new tommy Excel Discussion (Misc queries) 0 January 28th 09 12:22 AM
insert row above button (retrieve position of button) Max Excel Discussion (Misc queries) 3 November 7th 07 06:27 PM
insert row / insert column command buttons fairgreen Excel Worksheet Functions 1 October 29th 07 02:41 PM
Command Button vs Control Button RGibson Excel Programming 1 October 14th 03 02:24 AM
Command Button vs Form Button T K Excel Programming 4 August 26th 03 07:26 PM


All times are GMT +1. The time now is 08:20 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"