Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 39
Default hide row + buttons and password protect

Hello,

I'v a sheet with several rows and on those rows action buttons (which
I created with the control toolbar).

When opening my excel file I want several rows in the sheet and the
actions buttons on those rows to be hidden. To unhide them another
bottun must be clicked and the user must be prompted for a password.

My code is like below, the problem is that the buttons won't hide.

Sub hide_selection()
Range("9:9,11:11").Select
Selection.EntireRow.Hidden = True
End Sub

Sub unhide_selection()
pwd = "password"
i_pwd = InputBox("password please")
Select Case i_pwd
Case pwd
Range("9:9,11:11").Select
Selection.EntireRow.Hidden = False
Case Else
MsgBox "incorrect"
End Select
End Sub

Anyone a solution?

Bernd

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default hide row + buttons and password protect

Rightclick on each button
choose Format control
On the properties tab, choose move and size with cells.

bernd wrote:

Hello,

I'v a sheet with several rows and on those rows action buttons (which
I created with the control toolbar).

When opening my excel file I want several rows in the sheet and the
actions buttons on those rows to be hidden. To unhide them another
bottun must be clicked and the user must be prompted for a password.

My code is like below, the problem is that the buttons won't hide.

Sub hide_selection()
Range("9:9,11:11").Select
Selection.EntireRow.Hidden = True
End Sub

Sub unhide_selection()
pwd = "password"
i_pwd = InputBox("password please")
Select Case i_pwd
Case pwd
Range("9:9,11:11").Select
Selection.EntireRow.Hidden = False
Case Else
MsgBox "incorrect"
End Select
End Sub

Anyone a solution?

Bernd


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 39
Default hide row + buttons and password protect

thanks, exactly the information I needed!

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
Hide and password protect a worksheet Oldjay Excel Discussion (Misc queries) 2 April 30th 08 04:59 PM
Password Protect - put password in a cell in the workbook Mike R. Excel Programming 2 September 1st 06 06:29 AM
How do you permanently hide and password protect a column? Vegetable Dave Excel Discussion (Misc queries) 5 June 6th 06 06:34 PM
hide a column in a worksheet and password protect eoreality Excel Discussion (Misc queries) 1 February 8th 06 02:42 AM
Excel password but cant hide the sheets before entering password cakonopka[_3_] Excel Programming 1 January 30th 04 06:28 PM


All times are GMT +1. The time now is 02:14 PM.

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

About Us

"It's about Microsoft Excel"