![]() |
|
|
|
#1
|
|||
|
|||
|
Add a second paste line Code:
Rows(rowNum).PasteSpecial Paste:=xlFormats Code:
If rowNum = 0 Then Exit Sub |
|
#2
|
|||
|
|||
|
Thanks for the fast reply, NoSparks!
Using the Paste Special Formats code is actually one of the first things I tried (and researched). What I've learned is that while you can copy and paste formats on the user end of Excel and maintain merged cells, that doesn't seem to work in VBA. (I did try it again with your exact code just in case I was wrong, and sadly it did not work.) Thank you for the 'If 0 Then End' code though! I did add that and that does work. If you have any other suggestions about keeping the merged cells, I'd love to see them and give them a try! |
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Cannot get macro button to sort with merged cells on sheet
|
lonniepoet | Excel Programming | 3 | 02-04-2016 04:33 PM |
| Create a command button that will insert another drop down menu | Tinamation | Word VBA | 1 | 11-06-2015 03:11 PM |
Table will not allow sorting because "cells are merged". I can't find the merged cells.
|
wendyloooo | Word Tables | 1 | 05-26-2015 01:19 PM |
| Accidentally merged cells? | Fraser | Excel | 2 | 02-16-2014 10:15 PM |
Command Button
|
cksm4 | Word VBA | 7 | 02-27-2011 08:47 PM |