Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
Hopefully a simple question. How can I change the protection on merged cells? The following line of code gives me an error if there are merged cells in the named range, but works fine if the named range contains no merged cells: range("mergedcells").locked = true Thanks in advance Shane |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I tried this and was unable to duplicate your problem. Could you give
some additional information. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Shane,
the range has to be unmerged before being locked, so try Range("mergedcells").UnMerge Range("mergedcells").Locked = True Range("mergedcells").Merge Ken Johnson |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I should have used a With/End With...
With Range("mergedcells") ..Unmerge ..Locked = True ..Merge End With Ken Johnson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Jim Rech's macro won't work (autofitting merged cells) | Excel Discussion (Misc queries) | |||
Macro Paste Special Merged Cells | Excel Programming | |||
Need macro to autofit height for merged cells | Excel Programming | |||
pasting into merged cells with a macro | Excel Programming | |||
Protecting merged cells | Excel Programming |