Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Prevent paste in Excel...?

Status
Not open for further replies.

Deanr

Technical User
Oct 26, 2001
2
US
Any way to disable paste within the excel application? Users are clobbering formulas and creating links by pasting from other workbooks. They don't seem to remember to use paste special > values, so I guess i have to cut off pasting completely...

TIA

Dean
 
Try this:

Function PasteAllowed(i_blnAllowed As Boolean)

Dim cmb As CommandBarControl

Const ID_PASTE = 22

For Each cmb In CommandBars.FindControls(, ID_PASTE)
cmb.Enabled = i_blnAllowed
Next

End Function

Call it in autoopen event/macro with 'False' parameter and autoclose event/macro with 'True'.

M :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top