![]() |
Disable sheet copy/move
Is it possible to disable copy and/or move sheet from one to othe workbook -- Caspe ----------------------------------------------------------------------- Casper's Profile: http://www.excelforum.com/member.php...fo&userid=1638 View this thread: http://www.excelforum.com/showthread.php?threadid=51684 |
Disable sheet copy/move
I don't think so.
You could stop the move by protecting the workbook's structu tools|protection|protect workbook But that kind of protection is easily broken. Casper wrote: Is it possible to disable copy and/or move sheet from one to other workbook? -- Casper ------------------------------------------------------------------------ Casper's Profile: http://www.excelforum.com/member.php...o&userid=16388 View this thread: http://www.excelforum.com/showthread...hreadid=516848 -- Dave Peterson |
Disable sheet copy/move
Maybe i didn't wrote my question right ... I need to disable "Move or Copy" on right click menu on sheet name. I know that is posible to disable copy and /or cut on cells right clic menu but i don't know how to refer to right click on sheet name -- Caspe ----------------------------------------------------------------------- Casper's Profile: http://www.excelforum.com/member.php...fo&userid=1638 View this thread: http://www.excelforum.com/showthread.php?threadid=51684 |
Disable sheet copy/move
It's called ply.
Application.CommandBars("Ply").Controls("move or copy...").Enabled = False or Application.CommandBars("Ply").Controls("move or copy...").Visible = False It's nice to turn it back when you're done (when you close your workbook). Don't forget to stop Edit|move or copy sheet... And any other toolbars that the user has created--or any macro that they've created... or just dragging (or controlclick and drag) to move/copy. (Sounds like a problem to me.) And I was answering the move/copy sheet--I didn't mean copying the cells (in that first post). Casper wrote: Maybe i didn't wrote my question right ... I need to disable "Move or Copy" on right click menu on sheet name. I know that is posible to disable copy and /or cut on cells right click menu but i don't know how to refer to right click on sheet name. -- Casper ------------------------------------------------------------------------ Casper's Profile: http://www.excelforum.com/member.php...o&userid=16388 View this thread: http://www.excelforum.com/showthread...hreadid=516848 -- Dave Peterson |
Disable sheet copy/move
If I understand you correctly then perhaps something like this...... Code ------------------- Sub AsAdsAds() DisableMoveCopy True End Sub Sub DisableMoveCopy(blnState As Boolean) Dim Combar As CommandBar Dim ComBarCtrl As CommandBarControl On Error Resume Next For Each Combar In Application.CommandBars Set ComBarCtrl = Combar.FindControl(ID:=848, recursive:=True) If Not ComBarCtrl Is Nothing Then ComBarCtrl.Enabled = blnState End If Next Set ComBarCtrl = Nothing End Sub ------------------- Don't forget to reset after use as this setting will remain -- 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=51684 |
Disable sheet copy/move
Thanks for help -- Casper ------------------------------------------------------------------------ Casper's Profile: http://www.excelforum.com/member.php...o&userid=16388 View this thread: http://www.excelforum.com/showthread...hreadid=516848 |
All times are GMT +1. The time now is 04:24 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com