Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hello,
I actually have two questions. I have, tried, to create a macro in "This Workbook", when I became dissatisfied with it I simply deleted it. The problem is even though this macro does not exist in "This Workbook" I still get a prompt (when opening) that asks if I want to enable macro's. Q1: How can I eliminate this? The reason I tried to eliminate it is I recorded the macro that was supposed to, unprotect the workbook / unhide a page, the macro is erroneous though; it looks like this: ' Keyboard Shortcut: Ctrl+Shift+U ' ActiveWorkbook.Unprotect Sheets("2005 Summary, Exhaustive").Visible = True End Sub The macro would work perfectly if when I hit the shortcut key's it would: unprotect the workbook / unhide a sheet named "2005 Summary, Exhaustive" / and automatically return the protection settings back when the user closes the file. Q2: Can this be done, if so how? Thanks for any help! -- Thank you, Trying Hard |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Q1: See:
http://www.officearticles.com/excel/...ft_excel .htm Q2: Sure. You'll need to create a macro that protects the workbook. Record that. Then hit Alt+F11 and get the "guts" (delete the sub/end sub line) of that code, and double-click the ThisWorkbook module. From the drop-downs at top-right, choose Workbook, and Before Close, paste the guts between the sub and end sub lines that are created. Hit the save diskette! Also realize that your password will be stored in the VBA code, so anyone who knows how to read it, can see it.... ************ Hope it helps! Anne Troy www.OfficeArticles.com Check out the NEWsgroup stats! Check out: www.ExcelUserConference.com "Trying Hard" wrote in message ... Hello, I actually have two questions. I have, tried, to create a macro in "This Workbook", when I became dissatisfied with it I simply deleted it. The problem is even though this macro does not exist in "This Workbook" I still get a prompt (when opening) that asks if I want to enable macro's. Q1: How can I eliminate this? The reason I tried to eliminate it is I recorded the macro that was supposed to, unprotect the workbook / unhide a page, the macro is erroneous though; it looks like this: ' Keyboard Shortcut: Ctrl+Shift+U ' ActiveWorkbook.Unprotect Sheets("2005 Summary, Exhaustive").Visible = True End Sub The macro would work perfectly if when I hit the shortcut key's it would: unprotect the workbook / unhide a sheet named "2005 Summary, Exhaustive" / and automatically return the protection settings back when the user closes the file. Q2: Can this be done, if so how? Thanks for any help! -- Thank you, Trying Hard |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Debra Dalgleish shows how to clean up all the remnants of macros:
http://www.contextures.com/xlfaqMac.html#NoMacros And I think I would have a macro named auto_open that would unprotect the workbook, hide whatever sheets you want hidden and then reprotect the workbook. Trying Hard wrote: Hello, I actually have two questions. I have, tried, to create a macro in "This Workbook", when I became dissatisfied with it I simply deleted it. The problem is even though this macro does not exist in "This Workbook" I still get a prompt (when opening) that asks if I want to enable macro's. Q1: How can I eliminate this? The reason I tried to eliminate it is I recorded the macro that was supposed to, unprotect the workbook / unhide a page, the macro is erroneous though; it looks like this: ' Keyboard Shortcut: Ctrl+Shift+U ' ActiveWorkbook.Unprotect Sheets("2005 Summary, Exhaustive").Visible = True End Sub The macro would work perfectly if when I hit the shortcut key's it would: unprotect the workbook / unhide a sheet named "2005 Summary, Exhaustive" / and automatically return the protection settings back when the user closes the file. Q2: Can this be done, if so how? Thanks for any help! -- Thank you, Trying Hard -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Search, Copy, Paste Macro in Excel | Excel Worksheet Functions | |||
Can T Get Macro To Run! | New Users to Excel | |||
Closing File Error | Excel Discussion (Misc queries) | |||
Help with macro looping and color query function | Excel Discussion (Misc queries) | |||
Date macro | Excel Discussion (Misc queries) |