Re: $$Excel-Macros$$ Same macro for multiple sheets

2013-04-18 Thread Pravin Gunjal
Thanks Vaibhav. It's working fine. Regards Pravin. On Thu, Apr 18, 2013 at 12:14 PM, VBA VABZ wrote: > hi > > Since you restricting to specific sheet it doesnt work.. > > > Try dis: > > Public g_blnUpdate As Boolean > > Public Sub Protect_Unprotect() > 'With ThisWorkbook.Worksheets("Sheet1") >

Re: $$Excel-Macros$$ Same macro for multiple sheets

2013-04-17 Thread VBA VABZ
hi Since you restricting to specific sheet it doesnt work.. Try dis: Public g_blnUpdate As Boolean Public Sub Protect_Unprotect() 'With ThisWorkbook.Worksheets("Sheet1") targetws = ActiveSheet.Name With ThisWorkbook.Worksheets(targetws) If g_blnUpdate = True Then g_blnUpda

$$Excel-Macros$$ Same macro for multiple sheets

2013-04-17 Thread Pravin Gunjal
Hello, How can I use the following macro for multiple sheets (this is placed in Module) :- Public g_blnUpdate As Boolean Public Sub Protect_Unprotect() With ThisWorkbook.Worksheets("Sheet1") If g_blnUpdate = True Then g_blnUpdate = False .Protect ElseIf g