ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Disabling the option to move cells programatically (https://www.excelbanter.com/excel-programming/335098-disabling-option-move-cells-programatically.html)

Devin Linnington

Disabling the option to move cells programatically
 
I am making a workbook with sheets that have references to other sheets in
that workbook. The problem is that when you move a cell you also change the
other cells that reference to that one. This screws up my entire workbook, so
I need a way to turn off the ability to move cells. I looked around a bit an
haven't found any options, so what I need is a way to turn on/off the
movement of cells from within a VBA program. If anyone knows the command I
would love to know what it is.
Thanks,
Devin L.

bigwheel

Disabling the option to move cells programatically
 
Protecting the worksheet should provide the solution to your problem

"Devin Linnington" wrote:

I am making a workbook with sheets that have references to other sheets in
that workbook. The problem is that when you move a cell you also change the
other cells that reference to that one. This screws up my entire workbook, so
I need a way to turn off the ability to move cells. I looked around a bit an
haven't found any options, so what I need is a way to turn on/off the
movement of cells from within a VBA program. If anyone knows the command I
would love to know what it is.
Thanks,
Devin L.


Devin Linnington

Disabling the option to move cells programatically
 
When you protect the worksheet it does not offer an option to stop users from
moving cells. I need them to be able to enter data in but not be able to move
the cell itself. Plus I was specifically wondering how to do this in VBA,
programattically, which I could not figure out how to do on my own. How would
one protect the worksheet with code?

"bigwheel" wrote:

Protecting the worksheet should provide the solution to your problem

"Devin Linnington" wrote:

I am making a workbook with sheets that have references to other sheets in
that workbook. The problem is that when you move a cell you also change the
other cells that reference to that one. This screws up my entire workbook, so
I need a way to turn off the ability to move cells. I looked around a bit an
haven't found any options, so what I need is a way to turn on/off the
movement of cells from within a VBA program. If anyone knows the command I
would love to know what it is.
Thanks,
Devin L.


Ivan F Moala[_66_]

Disabling the option to move cells programatically
 

If you mean turn off Cell Drag & drop then


Code
-------------------

Application.CellDragAndDrop = False

-------------------

--
Ivan F Moal

-----------------------------------------------------------------------
Ivan F Moala's Profile: http://www.excelforum.com/member.php...nfo&userid=195
View this thread: http://www.excelforum.com/showthread.php?threadid=38887


bigwheel

Disabling the option to move cells programatically
 
ActiveSheet.Protect or ActiveSheet.Protect Password:=pass

Of course, when you protect with a password, your users could see what that
is by looking at the macros, so, you would also need to protect access to
that (ToolsVBAProject PropertiesProtectionLock project for viewing)

"Devin Linnington" wrote:

When you protect the worksheet it does not offer an option to stop users from
moving cells. I need them to be able to enter data in but not be able to move
the cell itself. Plus I was specifically wondering how to do this in VBA,
programattically, which I could not figure out how to do on my own. How would
one protect the worksheet with code?

"bigwheel" wrote:

Protecting the worksheet should provide the solution to your problem

"Devin Linnington" wrote:

I am making a workbook with sheets that have references to other sheets in
that workbook. The problem is that when you move a cell you also change the
other cells that reference to that one. This screws up my entire workbook, so
I need a way to turn off the ability to move cells. I looked around a bit an
haven't found any options, so what I need is a way to turn on/off the
movement of cells from within a VBA program. If anyone knows the command I
would love to know what it is.
Thanks,
Devin L.


Devin Linnington

Disabling the option to move cells programatically
 
Thank you! I think I can take it from here, this just got me in the right
direction.
Devin L.

bigwheel

Disabling the option to move cells programatically
 
You're welcome and thanks for the feedback

"Devin Linnington" wrote:

Thank you! I think I can take it from here, this just got me in the right
direction.
Devin L.



All times are GMT +1. The time now is 11:36 PM.

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