LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7,247
Default Hide colum using VBA password

At is simplest, you could use something like the following to hide/unhide
column "E".

Sub HideUnhideWithPassword()
Dim PW As String
PW = InputBox("Enter a password:")
If StrComp(PW, "CorrectPassword", vbBinaryCompare) = 0 Then
With ThisWorkbook.Worksheets("Sheet1").Columns("E")
.Hidden = Not .Hidden
End With
Else
MsgBox "Invalid Password"
End If
End Sub


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
(email address is on the web site)

"shapiro" wrote in message
...
Does anyone know a VBA code to hide a coumn using a password?



 
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 a column using a password shapiro Excel Discussion (Misc queries) 2 February 23rd 07 09:05 PM
hide column with password checkQ Excel Discussion (Misc queries) 5 February 11th 07 09:39 PM
how to hide raws and use password speedo Excel Worksheet Functions 1 February 2nd 06 03:31 PM
how to hide raws and use password speedo Excel Discussion (Misc queries) 0 February 1st 06 03:34 PM
How do I hide a worksheet in Excel and use a password to un-hide . Dchung Excel Discussion (Misc queries) 3 December 2nd 04 06:24 AM


All times are GMT +1. The time now is 08:22 AM.

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"