PDA

View Full Version : ReadOnly Column



ankit_ddit
03-11-2009, 06:06 AM
how to make a column readonly when u export a excel..

lucas
03-11-2009, 07:30 AM
more details required.

ankit_ddit
03-11-2009, 01:08 PM
When u export excel file through coding. At that time if i want to make one column as a read only..no one can change the value of that colum (non editable).

Bob Phillips
03-11-2009, 01:09 PM
You mean that they cannot change it in the application that imports that Excel output? Wouldn't have thought that is possible.

ankit_ddit
03-11-2009, 01:17 PM
No man..when exporting excel from my application which developed in VB ...then when excel open i want to make some column readonly via my VB code..do u have any idea or not?

Bob Phillips
03-11-2009, 01:20 PM
Yes, that is easy then.

Select all cells, and unlock (Format>Protect and uncheck locked)

Select that cilumn, and lock (Format>protet and check locked)

Then protect the sheet, Tools>Protection.

ankit_ddit
03-11-2009, 01:27 PM
man I want a code...not from excel application..I want to do it from code

lucas
03-11-2009, 03:27 PM
So record a macro and see what you get. We might help you make it work better if you are nice and not so demanding. This is not a VB forum although we do have a forum for other applications help.

Bob will most likely have a solution but the best way to get people to help you is not to be cryptic with your first post in the thread and then demanding and petulant when no one understands your problem.

It wasn't until the 5th post that we finally got you to tell us you were running this from VB instead of VBA. There was no way for us to know that.

Thanks for understanding......