View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Rafael Ortiz[_3_] Rafael Ortiz[_3_] is offline
external usenet poster
 
Posts: 3
Default Make one column Invisible.

Use sheet protection. In other words, after hiding the column, use this
line:

ActiveSheet.Protect Password:="cat"

To unprotect, use:

ActiveSheet.Unprotect Password:="cat"

To prevent anyone from seeing the password by simply looking at the VBA
code, right-click the VBAProject(yourfilename) in Project Explorer, select
VBAProject Properties, click on the Protection tab, select "Lock project for
viewing," and give it a password. Then save, close the file, reopen and the
VBA code will be protected from viewing without the password.

Obviously change the password to suit your needs....

MRO

"Neeraja" wrote in message
...
Hi,

Could someone let me know if it is possible to make a
Column in Excel sheet Invisible by VBA Programming.
I need to Hide a Column which contains Data which is
useful for my Programming but not required to be viewed
by the User.

If i hide the column by, for e.g:

Range("N1").Value = "SKU Number"
Columns("N:N").Hidden = True

and then insert the required data into this, the user may
by mistake unhide it or possibly overwrite it somehow. I
dont what this to happen.

Its like i want to make the column invisible and somehow
lock it so that the user will not be able to unhide it.
how do i go about with this???
Thanks in Advance for any help.

Regards,
Neeraja.