PDA

View Full Version : [SOLVED] Assistance required



mdmackillop
03-07-2005, 03:52 PM
A small puzzle I can't work out here::confused: http://www.vbaexpress.com/forum/showthread.php?t=2184
Download the tmpgood.zip file
On the DefaultPickup sheet, click on the Restore Sheet button, on alternate uses it has a runtime error. The code basically copies formulae from a hidden copy of the sheet and inserts them with paste special, It also unprotects the sheet to permit the change and then reprotects it. The code seems to fail if the sheet is protected to start with, but the protection is being removed as required.
Try RestoreSheet|End|RestoreSheet
and RestoreSheet|End|Delete|RestoreSheet
Any ideas?

Jacob Hilderbrand
03-07-2005, 06:21 PM
The clipboard is being cleared so there is nothing left to paste. Put the copy code right before the paste code. Also you do not need to use Select.


Selection.Copy
Range("A1:S48").PasteSpecial Paste:=xlPasteFormulas, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False

mdmackillop
03-08-2005, 01:33 AM
Thanks Jake.:bow:

Jacob Hilderbrand
03-08-2005, 03:01 AM
You're Welcome :beerchug:

Take Care