Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have run into a problem with macros not executing when a sheet is protected
in Excel. I use Office XP. Any ideas on this? Thanks, Les |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sub MyMacro()
On Error goto ErrHandler worksheets("Sheet1").Unprotect Password:="ABC" ' current code ErrHandler: Worksheets("sheet1").Protect Password:="ABC" End Sub -- Regards, Tom Ogilvy "WLMPilot" wrote: I have run into a problem with macros not executing when a sheet is protected in Excel. I use Office XP. Any ideas on this? Thanks, Les |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Does this code still keep the sheet protected? Also, I have entered macros
before. Is this going to be an EVENT macro? Thanks, Les "Tom Ogilvy" wrote: Sub MyMacro() On Error goto ErrHandler worksheets("Sheet1").Unprotect Password:="ABC" ' current code ErrHandler: Worksheets("sheet1").Protect Password:="ABC" End Sub -- Regards, Tom Ogilvy "WLMPilot" wrote: I have run into a problem with macros not executing when a sheet is protected in Excel. I use Office XP. Any ideas on this? Thanks, Les |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
It unprotects the sheet while it runs and protects it again at the end.
It is meant to present a concept to integrate with your existing macro. -- Regards, Tom Ogilvy "WLMPilot" wrote: Does this code still keep the sheet protected? Also, I have entered macros before. Is this going to be an EVENT macro? Thanks, Les "Tom Ogilvy" wrote: Sub MyMacro() On Error goto ErrHandler worksheets("Sheet1").Unprotect Password:="ABC" ' current code ErrHandler: Worksheets("sheet1").Protect Password:="ABC" End Sub -- Regards, Tom Ogilvy "WLMPilot" wrote: I have run into a problem with macros not executing when a sheet is protected in Excel. I use Office XP. Any ideas on this? Thanks, Les |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
It unprotects while the macro executes and then protects it again? I am
trying to only have users access certain cells. The spreadsheet I initially had the problem with was one that a user could input their paycheck info for a year. Various statistical info was calculated on the same and other sheets. I had command buttons that were used to navigate to specific paychecks (if there were three separate incomes from three jobs) and to navigate to the other sheets. If my interpretation is correct, is the macro entered as an EVENT? Thanks, Les "Tom Ogilvy" wrote: It unprotects the sheet while it runs and protects it again at the end. It is meant to present a concept to integrate with your existing macro. -- Regards, Tom Ogilvy "WLMPilot" wrote: Does this code still keep the sheet protected? Also, I have entered macros before. Is this going to be an EVENT macro? Thanks, Les "Tom Ogilvy" wrote: Sub MyMacro() On Error goto ErrHandler worksheets("Sheet1").Unprotect Password:="ABC" ' current code ErrHandler: Worksheets("sheet1").Protect Password:="ABC" End Sub -- Regards, Tom Ogilvy "WLMPilot" wrote: I have run into a problem with macros not executing when a sheet is protected in Excel. I use Office XP. Any ideas on this? Thanks, Les |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Combobox problem in protected sheet | Excel Discussion (Misc queries) | |||
Problem with Macro/Protected Sheet | Excel Programming | |||
Macro and Protected Sheet Problem | Excel Programming | |||
excel - macro code to open a protected sheet, enter passowrd, and then protect sheet | Excel Programming | |||
Solver via VBA on protected sheet problem | Excel Programming |