View Single Post
 
Old 03-22-2017, 02:06 PM
NoSparks NoSparks is offline Windows 7 64bit Office 2010 64bit
Excel Hobbyist
 
Join Date: Nov 2013
Location: British Columbia, Canada
Posts: 842
NoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of light
Default

I can't really explain the error, but by suppressing error messages for that part of the code I believe what you're wanting to happen does happen.
Code:
On Error Resume Next

Set rng = Columns(3).SpecialCells(xlBlanks)
For Each ar In rng.Areas
ar(0).Copy ar
Next
      
Set rng = Columns(13).SpecialCells(xlBlanks)
For Each mr In rng.Areas
mr(0).Copy mr
Next

Set rng = Columns(14).SpecialCells(xlBlanks)
For Each nr In rng.Areas
nr(0).Copy nr
Next

On Error GoTo 0
Your code after that seems to have an issue but I don't know what you're trying to do.
Toggle a break point at the start of the While loop and F8 through the code to see if what you're expecting to be selected is actually what's being selected.
Reply With Quote