Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Below is a sub I have that unmerges any cells in the workbook. My problem is
that I now need this sub to exist in an add-in and run on any opened worksheet (I'd prefer it to test if merged cells exist 1st, but not a requirement). Ideally, it would iterate through all opened workbooks and run on any sheets. Given the fact that I'm not going to know the name of the workbook that will have the merged cells and that I will be performing actions on from the sub functions contained in the add-in, how can I force the below add-in sub to unmerge cells on the opened workbook? Right now it gives an error when run from Auto_Open() sub in the add-in. Error is "method cells of object _global failed" Sub UnMerge() Cells.Select With Selection .VerticalAlignment = xlTop .WrapText = False .Orientation = 0 .AddIndent = False .ShrinkToFit = False .ReadingOrder = xlContext .MergeCells = False End With End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Opening a workbook if not opened, going to it if already opened | Excel Programming | |||
Opening a workbook if not opened, going to it if already opened | Excel Programming | |||
Opening a workbook if not opened, going to it if already opened | Excel Programming | |||
How to see if the opened workbook is opened by another user ? | Excel Programming | |||
Sheets select method fails when workbook is opened by another workbook | Excel Programming |