Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
How do I protect Excel Workbook Structure except adding new sheets
Hi,
I am exporting some application data to Excel workbook through my C# code. I would like to Lock the Workbook to prevent users to edit the name of the sheet and some column data. But I need to allow user to add new sheet. Workbook.Protect method allows me to Lock the Structure of the workbook which includes not allowing to add new sheet. But As I said I need allow user nothing but adding newworksheet. How Do I do that ? |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
How do I protect Excel Workbook Structure except adding newsheets
On Jun 20, 1:02 pm, Som_Dev wrote:
Hi, I am exporting some application data to Excel workbook through my C# code. I would like to Lock the Workbook to prevent users to edit the name of the sheet and some column data. But I need to allow user to add new sheet. Workbook.Protect method allows me to Lock the Structure of the workbook which includes not allowing to add new sheet. But As I said I need allow user nothing but adding newworksheet. How Do I do that ? You could create a macro that unprotects the workbook, adds a sheet, then protects the workbook again. And give the users a button to operate it. And password protect your VBA so they can't see the workbook password in your code, which shows as plain text. |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
How do I protect Excel Workbook Structure except adding new sh
Hi Spiky,
Thank you very much for your reply. Do you know How to create custom button in the toolbar of the sheet ? "Spiky" wrote: On Jun 20, 1:02 pm, Som_Dev wrote: Hi, I am exporting some application data to Excel workbook through my C# code. I would like to Lock the Workbook to prevent users to edit the name of the sheet and some column data. But I need to allow user to add new sheet. Workbook.Protect method allows me to Lock the Structure of the workbook which includes not allowing to add new sheet. But As I said I need allow user nothing but adding newworksheet. How Do I do that ? You could create a macro that unprotects the workbook, adds a sheet, then protects the workbook again. And give the users a button to operate it. And password protect your VBA so they can't see the workbook password in your code, which shows as plain text. |
#4
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
How do I protect Excel Workbook Structure except adding new sh
On Jun 20, 4:50 pm, Som_Dev wrote:
Hi Spiky, Thank you very much for your reply. Do you know How to create custom button in the toolbar of the sheet ? Toolbar buttons stay with the computer generally, not with the workbook. So I always make buttons right in a worksheet with the Text Box drawing tool. This also allows for a real name to show for the button instead of a tiny picture since the text box can be as large as you like. Create a Text Box however you like, I usually add some background color, rounded corners and shadowing so it looks more like a button. Right-click on the box and choose Assign Macro. You already have to have your macro created so you can just pick it from the list. The box will become clickable, probably with a pointing finger cursor like for a hyperlink. Locking the sheet means they cannot mess up the text box/button you just made. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Protect an Excel 2007 workbook structure | Excel Discussion (Misc queries) | |||
Use Macro to protect choosen sheets in workbook | Excel Discussion (Misc queries) | |||
Adding sheets to workbook | Excel Worksheet Functions | |||
Macros for Protect/Unprotect all sheets in a workbook | Excel Discussion (Misc queries) | |||
How can I protect several sheets in a workbook simultaneously? | Excel Discussion (Misc queries) |