View Single Post
 
Old 08-29-2017, 10:59 AM
TileGal TileGal is offline Windows 7 64bit Office 2013
Novice
 
Join Date: Jan 2017
Posts: 9
TileGal is on a distinguished road
Default

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!

Quote:
Originally Posted by NoSparks View Post
Add a second paste line
Code:
Rows(rowNum).PasteSpecial Paste:=xlFormats
You might also want to add
Code:
If rowNum = 0 Then Exit Sub
right after the InputBox.
Reply With Quote