Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
'very hidden' columns
HI all
Im after a simple macro that will unprotect sheet1, hide columns c- and h-k and re-protect the sheet. Can an xlveryhidden function be use as it is sensitive data being hidden?? Also, a click event to unhid the columns would be needed. Password protection (user prompt) would be needed also?? Any ideas?? Cheers to all!!! -- Message posted from http://www.ExcelForum.com |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
'very hidden' columns
First, if it's sensitive data, you should re-evaluate whether you should
be distributing it at all. Bypassing worksheet passwords is a matter of a few seconds if you have the wherewithal to find these groups. See http://www.mcgimpsey.com/excel/removepwords.html Second, xlVeryHidden applies only to a worksheet's visibility, not to columns. Here's one way toggle hiding your columns: Public Sub ToggleHiddenColumns() Const sPWORD As String = "drowssap" With ActiveSheet .Unprotect sPWORD With .Range("C:F,H:K").EntireColumn .Hidden = Not .Hidden End With .Protect sPWORD End With End Sub If you want the user to enter the password, here's one way: Public Sub ToggleHiddenColumns() Dim vPWord As Variant With ActiveSheet Do vPWord = Application.InputBox( _ Prompt:="Enter Password:", _ Type:=2) If vPWord = False Then Exit Sub 'User canceled Loop Until Len(vPWord) 0 On Error GoTo Wrong_Password .Unprotect vPWord On Error GoTo 0 With .Range("C:F,H:K").EntireColumn .Hidden = Not .Hidden End With .Protect vPWord End With Exit Sub Wrong_Password: MsgBox "That was the wrong password!" End Sub In article , gavmer wrote: HI all Im after a simple macro that will unprotect sheet1, hide columns c-f and h-k and re-protect the sheet. Can an xlveryhidden function be used as it is sensitive data being hidden?? Also, a click event to unhide the columns would be needed. Password protection (user prompt) would be needed also?? Any ideas?? Cheers to all!!!! |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
'very hidden' columns
Hello,
See http://www.mcgimpsey.com/excel/removepwords.html Is this about Excel 2000, 2002, 2003 or also true for Add-Ins written an protected with Excel 97? I somewhere heard that XL97 Add-Ins cannot be cracked because the VBA-Password-Protection worked in a different way. So, does it make sense to use XL97 to make "unbreakable" files (that do not need functions added in later versions)? regards arno |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
'very hidden' columns
The technique works for VBA add-ins, too, though the macro would require
some modification, or the add-in would have to be restored to a workbook - which takes all of about 2 seconds in the VBE. It's true that VBA Password protection is different than worksheet protection, but it can be bypassed as, or more, easily than worksheet protection. It's anything but "unbreakable". Compiled add-ins (COM add-ins) are not susceptible to this technique. However XL97 doesn't support COM add-ins. The bottom line is that XL is an extremely poor application for keeping data secure. In article , "arno" wrote: Is this about Excel 2000, 2002, 2003 or also true for Add-Ins written an protected with Excel 97? I somewhere heard that XL97 Add-Ins cannot be cracked because the VBA-Password-Protection worked in a different way. So, does it make sense to use XL97 to make "unbreakable" files (that do not need functions added in later versions)? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
2007 Worksheet, Hidden Columns, .CSV Format Saves Hidden Column Da | Excel Discussion (Misc queries) | |||
Copy and Paste with hidden columns remaining hidden | Excel Discussion (Misc queries) | |||
Hidden rows columns won't stay hidden | Excel Worksheet Functions | |||
Hidden Columns No Longer Hidden after Copying Worksheet? | Excel Discussion (Misc queries) | |||
How to keep hidden columns hidden using protection | Excel Discussion (Misc queries) |