title: How can I remove blank/empty cells from my clipboard in VBA?
body: <p>I'm working on a project right now and am adding the finishing touches. In short, I have the user copy a worksheet, click my macro button, and have my program do the rest. I'm running into an error where selecting the entire sheet (blank cells and all) to copy to clipboard causes "activesheet.paste" to give an error. To fix this, I have been selecting only cells filled with data and my problem goes away.
  However, I'm trying to make this as user friendly as possible and in order to do so, am trying to allow the user to copy the entire spreadsheet and have my macro eliminate the empty cells before pasting again. I'm not quite sure if this is possible, but I would greatly appreciate any help I can get. Thanks!</p>
  
  <p>part that's giving me trouble:</p>
  
  <pre><code>Range("A4").Select
  On Error Resume Next
  ActiveSheet.Paste
  If Err Then
      MsgBox "Clipboard is empty, restart macro.": Err.Clear this line
      End
  End If
  </code></pre>