2

I am currently copying a selection of cells in one workbook and attempting to Pastespecial with Skip Blanks into another workbook (the destination file will be different every time, so I have saved a super simple macro into my Personal.xlsb book for the paste).

When I open the destination file and run the macro through the keyboard shortcut, it works fine. However, when I run it through the Macro display pop-up(ALT+F8) I get the Runtime Error.

Does anyone know why this would be / a way around it?

I am working with a desktop automation software and it can't trigger a macro through keyboard shortcuts, only though the Macro display pop-up sadly.

The code for my paste macro is:

Sub ps()
' Keyboard Shortcut: Ctrl+d
'
    Range("A2").Select
    Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _
        True, Transpose:=False
End Sub

Thanks in advance, Ruby

Ruby.Smith
  • 21
  • 3

0 Answers0