Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 58
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Formulas Changed when User Downloaded Spreadsheet Connie Excel Discussion (Misc queries) 14 October 20th 06 11:16 AM
Problem with data from cells in merge fields caryd Excel Worksheet Functions 1 May 19th 06 10:21 AM
How to merge cells in Word document by VBA code?? SiriS Excel Discussion (Misc queries) 0 May 4th 06 12:03 PM
Excel Macro - Merge Cells unavailable - Unable to figue out why. newexceluser Excel Worksheet Functions 0 January 18th 06 03:22 PM
Saving worksheet so that merge cells work in previous versions jimmylightning Excel Worksheet Functions 1 December 25th 05 01:58 PM


All times are GMT +1. The time now is 01:06 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"