Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
UserInterfaceOnly
Hi,
I've been trying to put this in my workbook but the userinterfaceonly is not picking up. Is there something else I need to do? Private Sub Workbook_Open() Dim wkSheet As Worksheet For Each wkSheet In Worksheets wkSheet.Protect Password:="pw", _ userinterfaceonly:=True, _ AllowFormattingCells:=True, _ AllowFiltering:=True Next wkSheet End Sub -- Thanks for your help. Karen53 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
UserInterfaceOnly
See
http://www.contextures.com/xlautofilter03.html#Protect -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Karen53" wrote in message ... Hi, I've been trying to put this in my workbook but the userinterfaceonly is not picking up. Is there something else I need to do? Private Sub Workbook_Open() Dim wkSheet As Worksheet For Each wkSheet In Worksheets wkSheet.Protect Password:="pw", _ userinterfaceonly:=True, _ AllowFormattingCells:=True, _ AllowFiltering:=True Next wkSheet End Sub -- Thanks for your help. Karen53 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
UserInterfaceOnly
Hi Ron,
Thank you so much for the information! I needed it! I haven't gotten there yet, though. If you look at my code the userinterfaceonly:=True is in lower case. I type them in lower case so when it's correct and accepted Excel adds the case formatting. Excel is not doing so with the userinterfaceonly. I see no typing errors. Shouldn't some of the letters be capitalized like the others? -- Thanks for your help. Karen53 "Ron de Bruin" wrote: See http://www.contextures.com/xlautofilter03.html#Protect -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Karen53" wrote in message ... Hi, I've been trying to put this in my workbook but the userinterfaceonly is not picking up. Is there something else I need to do? Private Sub Workbook_Open() Dim wkSheet As Worksheet For Each wkSheet In Worksheets wkSheet.Protect Password:="pw", _ userinterfaceonly:=True, _ AllowFormattingCells:=True, _ AllowFiltering:=True Next wkSheet End Sub -- Thanks for your help. Karen53 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
UserInterfaceOnly
-No need for userinterfaceonly in the newer Excel versions
Record a macro when you do your steps manual and look at the code in 2002 and up You need the code on Debra's site in 97-2000 -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Karen53" wrote in message ... Hi Ron, Thank you so much for the information! I needed it! I haven't gotten there yet, though. If you look at my code the userinterfaceonly:=True is in lower case. I type them in lower case so when it's correct and accepted Excel adds the case formatting. Excel is not doing so with the userinterfaceonly. I see no typing errors. Shouldn't some of the letters be capitalized like the others? -- Thanks for your help. Karen53 "Ron de Bruin" wrote: See http://www.contextures.com/xlautofilter03.html#Protect -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Karen53" wrote in message ... Hi, I've been trying to put this in my workbook but the userinterfaceonly is not picking up. Is there something else I need to do? Private Sub Workbook_Open() Dim wkSheet As Worksheet For Each wkSheet In Worksheets wkSheet.Protect Password:="pw", _ userinterfaceonly:=True, _ AllowFormattingCells:=True, _ AllowFiltering:=True Next wkSheet End Sub -- Thanks for your help. Karen53 |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
UserInterfaceOnly
Ron,
Since I'm using 2003 I don't need to set it? It's that way automatically? Great! Thanks! -- Thanks for your help. Karen53 "Ron de Bruin" wrote: -No need for userinterfaceonly in the newer Excel versions Record a macro when you do your steps manual and look at the code in 2002 and up You need the code on Debra's site in 97-2000 -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Karen53" wrote in message ... Hi Ron, Thank you so much for the information! I needed it! I haven't gotten there yet, though. If you look at my code the userinterfaceonly:=True is in lower case. I type them in lower case so when it's correct and accepted Excel adds the case formatting. Excel is not doing so with the userinterfaceonly. I see no typing errors. Shouldn't some of the letters be capitalized like the others? -- Thanks for your help. Karen53 "Ron de Bruin" wrote: See http://www.contextures.com/xlautofilter03.html#Protect -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Karen53" wrote in message ... Hi, I've been trying to put this in my workbook but the userinterfaceonly is not picking up. Is there something else I need to do? Private Sub Workbook_Open() Dim wkSheet As Worksheet For Each wkSheet In Worksheets wkSheet.Protect Password:="pw", _ userinterfaceonly:=True, _ AllowFormattingCells:=True, _ AllowFiltering:=True Next wkSheet End Sub -- Thanks for your help. Karen53 |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
UserInterfaceOnly
Hi ron,
I'm confused by something. I've recorded my macro with a password yet the password does not show up in the code. Don't I need the password? How do I reset if if I unprotect the sheet? I'm in 2003. ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True _ , AllowFormattingCells:=True, AllowFiltering:=True -- Thanks for your help. Karen53 "Ron de Bruin" wrote: -No need for userinterfaceonly in the newer Excel versions Record a macro when you do your steps manual and look at the code in 2002 and up You need the code on Debra's site in 97-2000 -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Karen53" wrote in message ... Hi Ron, Thank you so much for the information! I needed it! I haven't gotten there yet, though. If you look at my code the userinterfaceonly:=True is in lower case. I type them in lower case so when it's correct and accepted Excel adds the case formatting. Excel is not doing so with the userinterfaceonly. I see no typing errors. Shouldn't some of the letters be capitalized like the others? -- Thanks for your help. Karen53 "Ron de Bruin" wrote: See http://www.contextures.com/xlautofilter03.html#Protect -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Karen53" wrote in message ... Hi, I've been trying to put this in my workbook but the userinterfaceonly is not picking up. Is there something else I need to do? Private Sub Workbook_Open() Dim wkSheet As Worksheet For Each wkSheet In Worksheets wkSheet.Protect Password:="pw", _ userinterfaceonly:=True, _ AllowFormattingCells:=True, _ AllowFiltering:=True Next wkSheet End Sub -- Thanks for your help. Karen53 |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
UserInterfaceOnly
I've recorded my macro with a password yet the password does not show up in the code. I would assume that the macro recorder doesn't insert the password into recorded code as a security measure. If you are using a password, you may not want it the code for anyone to see. You can modify the recorded code to include a password and the UI flag: ActiveSheet.Protect DrawingObjects:=True, Contents:=True, _ Scenarios:=True, Password:="abc", userinterfaceonly:=True -- Cordially, Chip Pearson Microsoft MVP - Excel, 10 Years Pearson Software Consulting www.cpearson.com (email on the web site) "Karen53" wrote in message ... Hi ron, I'm confused by something. I've recorded my macro with a password yet the password does not show up in the code. Don't I need the password? How do I reset if if I unprotect the sheet? I'm in 2003. ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True _ , AllowFormattingCells:=True, AllowFiltering:=True -- Thanks for your help. Karen53 "Ron de Bruin" wrote: -No need for userinterfaceonly in the newer Excel versions Record a macro when you do your steps manual and look at the code in 2002 and up You need the code on Debra's site in 97-2000 -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Karen53" wrote in message ... Hi Ron, Thank you so much for the information! I needed it! I haven't gotten there yet, though. If you look at my code the userinterfaceonly:=True is in lower case. I type them in lower case so when it's correct and accepted Excel adds the case formatting. Excel is not doing so with the userinterfaceonly. I see no typing errors. Shouldn't some of the letters be capitalized like the others? -- Thanks for your help. Karen53 "Ron de Bruin" wrote: See http://www.contextures.com/xlautofilter03.html#Protect -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Karen53" wrote in message ... Hi, I've been trying to put this in my workbook but the userinterfaceonly is not picking up. Is there something else I need to do? Private Sub Workbook_Open() Dim wkSheet As Worksheet For Each wkSheet In Worksheets wkSheet.Protect Password:="pw", _ userinterfaceonly:=True, _ AllowFormattingCells:=True, _ AllowFiltering:=True Next wkSheet End Sub -- Thanks for your help. Karen53 |
#8
Posted to microsoft.public.excel.programming
|
|||
|
|||
UserInterfaceOnly
Thank you, Chip! The password did work.
Unfortunately, I need to add and delete rows which requires my removing and adding the protection and password. the same with the workbook protection as I need to add, move and delete worksheets. I do have my vba code password protected as well. I am concerned that my add worksheet routine takes so long. I have screenupdating turned off. The process inserts quite a few links between the main page and the newly created sheet as well as placing the new sheet in order by unit number. Is it normal for it to take quite a while or do I have a problem? I would appreciate any suggestions you may have. -- Thanks for your help. Karen53 "Chip Pearson" wrote: I've recorded my macro with a password yet the password does not show up in the code. I would assume that the macro recorder doesn't insert the password into recorded code as a security measure. If you are using a password, you may not want it the code for anyone to see. You can modify the recorded code to include a password and the UI flag: ActiveSheet.Protect DrawingObjects:=True, Contents:=True, _ Scenarios:=True, Password:="abc", userinterfaceonly:=True -- Cordially, Chip Pearson Microsoft MVP - Excel, 10 Years Pearson Software Consulting www.cpearson.com (email on the web site) "Karen53" wrote in message ... Hi ron, I'm confused by something. I've recorded my macro with a password yet the password does not show up in the code. Don't I need the password? How do I reset if if I unprotect the sheet? I'm in 2003. ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True _ , AllowFormattingCells:=True, AllowFiltering:=True -- Thanks for your help. Karen53 "Ron de Bruin" wrote: -No need for userinterfaceonly in the newer Excel versions Record a macro when you do your steps manual and look at the code in 2002 and up You need the code on Debra's site in 97-2000 -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Karen53" wrote in message ... Hi Ron, Thank you so much for the information! I needed it! I haven't gotten there yet, though. If you look at my code the userinterfaceonly:=True is in lower case. I type them in lower case so when it's correct and accepted Excel adds the case formatting. Excel is not doing so with the userinterfaceonly. I see no typing errors. Shouldn't some of the letters be capitalized like the others? -- Thanks for your help. Karen53 "Ron de Bruin" wrote: See http://www.contextures.com/xlautofilter03.html#Protect -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Karen53" wrote in message ... Hi, I've been trying to put this in my workbook but the userinterfaceonly is not picking up. Is there something else I need to do? Private Sub Workbook_Open() Dim wkSheet As Worksheet For Each wkSheet In Worksheets wkSheet.Protect Password:="pw", _ userinterfaceonly:=True, _ AllowFormattingCells:=True, _ AllowFiltering:=True Next wkSheet End Sub -- Thanks for your help. Karen53 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Userinterfaceonly | Excel Worksheet Functions | |||
UserInterfaceOnly question. | Excel Programming | |||
UserInterfaceOnly | Excel Discussion (Misc queries) | |||
UserInterfaceOnly on the Mac | Excel Programming | |||
UserInterfaceOnly on the Mac | Excel Programming |