Why this macro not running in 2007

vipulgos

Active Member
Joined
Aug 17, 2002
Messages
335
Office Version
  1. 2010
Platform
  1. Windows
Dear all,
This macro I was running in Excel2003 since many years

Code:
Sub unprotect_Click()
'
' unprotect_Click Macro
' Macro recorded 11-10-2003 by vipul
'
      
    ActiveSheet.Unprotect
End Sub
Now what's wrong with Excel2007
This macro is in personal.xlsb

This macro is still running with no problem
Sub protect_Click()
'
' protect_Click Macro
' Macro recorded 11-10-2003 by vipul
'
ActiveSheet.Protect

End Sub

Both the codes are there in personal.xlsb
but protect_click is working in any open workbook, but the unprotect_click is not working except that in personal workbook only
 
Let me attach my workbook personal.xlsb
Please save it in C:\Users\%username%\AppData\Roaming\Microsoft\Excel\XLSTART
add buttons for both in ribbon to call these macros protect_click and unprotect_click macros
and see what happens to you
here is the link for that personal workbook click here or https://app.box.com/s/yppi481qp7msf22ijqux
 
Upvote 0

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
Afraid I won't be able to help as your file worked fine for me (obviously had to change the name so not to conflict with my PERSONAL file).
 
Upvote 0
Is it possible by any mean, that I am using Win 7 (64 bit) an may have some issue with Excel 2007. If so why Protect_click macro is still running fine
Am I have to change the personal.xlsb to personal.xlsm?
And most importantly:
This macro is running while the personal.xlsb file is open and run the macro unprotect from ribbon in same workbook, i.e. personal.xlsb
but when I hide the personal.xlsb and then tries to run the macro unprotect_click into other book, say book1, then and then only, it gives me error.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,216,100
Messages
6,128,834
Members
449,471
Latest member
lachbee

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top