Re: $$Excel-Macros$$ PROTECT EACH SHEET WITH MSG BOX.

2013-05-17 Thread Paul Schreiner
people you can, As long as ever you can.” - John Wesley - From: Prabhu Pinky To: excel-macros@googlegroups.com Sent: Fri, May 17, 2013 7:56:56 AM Subject: Re: $$Excel-Macros$$ PROTECT EACH SHEET WITH MSG BOX. Hi experts, i

Re: $$Excel-Macros$$ PROTECT EACH SHEET WITH MSG BOX.

2013-05-17 Thread Abhishek Jain
Try replacing it with: ActiveSheet.Protect , DrawingObjects:=True, _ Contents:=True, Scenarios:=True OR ActiveSheet.Protect , DrawingObjects:=True, Contents:=True, Scenarios:=True Whenever part of a syntax is appended in a second line, it is mandatory to end the first line with an underscore "

Re: $$Excel-Macros$$ PROTECT EACH SHEET WITH MSG BOX.

2013-05-17 Thread Prabhu Pinky
*Hi experts, in the below code, am getting error on highlighted lines.. pls help* Sub PROTECT_EACH_SHEET() ' Loop through all sheets in the workbook For i = 1 To Sheets.Count ' Activate each sheet in turn. Sheets(i).Activate response = MsgBox("Do you want

Re: $$Excel-Macros$$ PROTECT EACH SHEET WITH MSG BOX.

2013-05-16 Thread Paul Schreiner
You are currently testing your "response" variable for vbYes and vbNo If you simply add: Else   Exit for then, whenever neither the Yes button, or the No button is pressed (like when you hit "Escape" or "cancel" the window) then the loop will exit.   Paul