Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Allowing user to merge cells
how can i allow users to merge cells when i protect the worksheet? I dont see
the open in the dialog box. |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Allowing user to merge cells
Sorry, protecting the worksheet disables the merge feature.
The only way you'd be able to do this that I am aware of is to write a macro to: -unprotect the sheet -merge the cells -reprotect the sheet If you want to go that route, then go into your workbook and: -Press Alt+F11 to open the Visual Basic Editor (VBE) -Press Ctrl+R to show the project (windows looking) explorer -Navigate through until you find your project and expand it -Right click one of the objects in your project and choose Insert-- Module -In the pane that shows up at right, paste the following code: Sub MergeProtected() Const myPassword = "password" With ActiveSheet If .ProtectContents = True Then .Unprotect myPassword Selection.Cells.Merge .Protect myPassword Else Selection.Cells.Merge End If End With End Sub -Change the password (between the quotes) to the password you want to use to protect the sheet -Exit the VBE -Save your workbook -Highlight the cells you want to merge, then press Alt+F8 -Choose MergeProtected from the list, and you should have some merged cells. HTH, Ken Puls, CMA - Microsoft MVP (Excel) www.excelguru.ca Lavanya wrote: how can i allow users to merge cells when i protect the worksheet? I dont see the open in the dialog box. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Formulas Changed when User Downloaded Spreadsheet | Excel Discussion (Misc queries) | |||
Problem with data from cells in merge fields | Excel Worksheet Functions | |||
How to merge cells in Word document by VBA code?? | Excel Discussion (Misc queries) | |||
Excel Macro - Merge Cells unavailable - Unable to figue out why. | Excel Worksheet Functions | |||
Saving worksheet so that merge cells work in previous versions | Excel Worksheet Functions |