protecting a sheet in a different workbook

  • Thread starter Thread starter Dan Winterton
  • Start date Start date
D

Dan Winterton

I have a protected worksheet that VBA unprotects, copies
the sheet, opens a new workbook, then pastes the data from
the sheet.

I need to re-protect the original workbook AFTER I am in
the new book? Can I protect a worksheet in another open
workbook?

I tried protecting the sheet before opening the new book,
but I lose the data I am trying to copy and the paste
event fails. I also tried just leaving the sheet
protected during the copy and paste, but it will not allow
the formulas to copy over, which I need.

Any help is greatly appreciated.
Dan Winterton
 
why not open the new dest wb first>open the source>unprotect>copy to dest wb
WITHOUT selecting>protect source>close source>save destination.
 
Why not just copy the sheet

Activesheet.copy

put a copy of the activesheet in a new workbook. Both sheets were protected
after the copy.
 
Back
Top