Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default '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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,624
Default '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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 184
Default '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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,624
Default '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
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
2007 Worksheet, Hidden Columns, .CSV Format Saves Hidden Column Da Tammy Excel Discussion (Misc queries) 3 April 2nd 09 11:40 PM
Copy and Paste with hidden columns remaining hidden Pendelfin Excel Discussion (Misc queries) 2 February 26th 09 11:35 AM
Hidden rows columns won't stay hidden christie Excel Worksheet Functions 0 September 30th 08 05:44 PM
Hidden Columns No Longer Hidden after Copying Worksheet? EV Nelson Excel Discussion (Misc queries) 1 December 6th 06 05:10 PM
How to keep hidden columns hidden using protection Dave Excel Discussion (Misc queries) 1 March 1st 06 02:20 AM


All times are GMT +1. The time now is 03:18 AM.

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"