ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Locking down columns (https://www.excelbanter.com/excel-programming/291942-locking-down-columns.html)

TripleT

Locking down columns
 
Hi

I'm hoping someone can help me out. I'd like to add some code to
"ThisWorkbook" in M/Soft Excel Objects. What I'd like is for the code
to stop any inserting or deleting of columns.

Can anyone help?

Cheers.


---
Message posted from http://www.ExcelForum.com/


Trevor Shuttleworth

Locking down columns
 
I don't think you can do this with the Workbook code. Have you tried
protecting the sheet ?

Regards

Trevor


"TripleT " wrote in message
...
Hi

I'm hoping someone can help me out. I'd like to add some code to
"ThisWorkbook" in M/Soft Excel Objects. What I'd like is for the code
to stop any inserting or deleting of columns.

Can anyone help?

Cheers.


---
Message posted from http://www.ExcelForum.com/




TripleT[_2_]

Locking down columns
 
Hi

Yes, I've tried using protection. My problem with that, is that it als
locks down row controls (inserting and deleting). I would like t
retain this piece of functionality. So the only protection I nee
(apart from protecting the VBA) is controlling what users do with th
columns.

Cheers

--
Message posted from http://www.ExcelForum.com


TripleT[_3_]

Locking down columns
 
I could possible use workbook protection, if I can modify this piece o
code to work:

'set validation for Advisor
With ActiveSheet.Cells(myRow, Advisor).Validation
.Delete
.Add Type:=xlValidateList, Formula1:="=Advisor"
End With


That code works when protection isn't off, but doesn't when it is on.

Any help on this would be gratefully received.

Cheers

--
Message posted from http://www.ExcelForum.com



All times are GMT +1. The time now is 01:15 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com