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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Retaining cell format when paste 1

Status
Not open for further replies.

isma786

Technical User
Apr 7, 2004
31
US
I have a spreadsheet that is protected. cells (B7:B26) are unlocked for user entry, but i want the cells to retain the format of have boxes around them and being coloured light turquoise even though the user may paste into them.

At the moment when i paste into the cell it changes to whatever was into copied cell.

do i just add code selection_change to that cell that when it changes it will re-format those cells? this seems a little crude.

thanks for your help.
 
Don't allow 'em to paste

within the selection change event:

application.cutcopymode = false

and within the sheet activate event as well for good measure !!

Rgds, Geoff

Never test the depth of water with both feet

Help us to help you by reading FAQ222-2244 before you ask a question
 
thanks I was worried as those cells are validated and copying over them ignores the validation rules....

phew!!!! you saved me,,
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top