ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Shared Workbooks and activecell (https://www.excelbanter.com/excel-programming/289295-shared-workbooks-activecell.html)

Gerry Maher

Shared Workbooks and activecell
 
I have a shared workbook on which I want to perform a VBA routine: On worksheet change, I want to lock the activcell. For some reason, it appears that the activecell property will not work in the shared workbook. Is this true for all shared workbooks? Can anyone suggest a workaround? (I don't want to lock the entire selection - I only want to lock the cell that changed.

Thank you
Gerry Maher

BrianB

Shared Workbooks and activecell
 
ActiveCell operates at Application level i.e. its full designation i
:-
Application.ActiveCell
The Application in this case is Excel.

It refers to the cell that is currently active in the worksheet that i
itself active. Presumably you are using :-
ActiveCell.Locked = True

Presumably you need to be more specific. To lock a cell we use the sam
procedure as changing any other cell format property, something lik
:-

Workbooks("Book1.xls").Worksheets("Sheet1").Range( "A1").Locked = Tru

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


Dave Peterson[_3_]

Shared Workbooks and activecell
 
I'm guessing that you want to unprotect the worksheet, lock the cell, and
reprotect the worksheet.

If I'm close, then the bad news is you can't change sheet protection in a shared
workbook.

xl2002 and xl2003 offer finer control of what users can do on protected
worksheets--but xl2002 won't let you change the "lockedness" of a cell in a
protected sheet. (don't have xl2003 to check.)



Gerry Maher wrote:

I have a shared workbook on which I want to perform a VBA routine: On worksheet change, I want to lock the activcell. For some reason, it appears that the activecell property will not work in the shared workbook. Is this true for all shared workbooks? Can anyone suggest a workaround? (I don't want to lock the entire selection - I only want to lock the cell that changed.)

Thank you,
Gerry Maher


--

Dave Peterson



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

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