How to Fix Excel for Mac PasteSpecial Run-time Error 438
Question details
The user is experiencing a Run-time Error 438 when running VBA code that uses PasteSpecial with ppPasteMetafilePicture on Excel for Mac, which is also accompanied by slow pasting or empty clipboard reports.

- Product
- Excel for Mac
- Device & OS
- macOS
- Scenario
- Executing VBA scripts to copy and paste objects as metafile pictures across Office applications.
- Observed behavior
- The macro throws Run-time error 438, copy/paste operations execute slowly, and the script occasionally reports that the clipboard is empty.
Before troubleshooting your VBA script, ensure that your macOS and Microsoft Office applications are updated to the latest versions, as clipboard handling processes often vary between minor updates.
Replace PasteSpecial with CopyPicture and Standard Paste
Modify your VBA code to avoid the unsupported Windows metafile format by using standard copy and paste methods instead.
Mac versions of Excel and PowerPoint do not fully support the Windows-specific metafile (EMF/WMF) workflows natively. Changing how the object is copied bypasses the need for PasteSpecial formats.
Open your VBA editor and locate the line where the object is copied. Change the standard `.Copy` method to `.CopyPicture`.
Find the line using `PasteSpecial` with `ppPasteMetafilePicture` and replace it with a standard `ActiveSheet.Paste` command.
Run the updated script on your Mac to verify if the object pastes successfully without triggering the Run-time error 438.

Bypass the Error Using VBA Error Handling
If the paste action actually completes in the background despite the error popup, you can instruct the code to ignore this specific error.
Try WPS Office for Seamless Cross-Platform Spreadsheets
Tired of dealing with VBA compatibility errors and clipboard glitches between Windows and Mac? WPS Office provides a lightweight, highly compatible alternative with excellent support for standard Excel files, making it easier to manage your spreadsheet workflows across different devices without costly subscriptions.
- 1. Download WPS Office: Visit the WPS Office website and download the free installation package for your Mac.
- 2. Open Your Spreadsheet: Launch WPS Spreadsheet and open your existing .xlsx or .xlsm file to continue working immediately.
- 3. Edit Without Errors: Enjoy a smoother experience with cross-platform editing and robust format compatibility.

Frequently Asked Questions
Why does ppPasteMetafilePicture cause an error on Mac?
Metafile pictures (such as EMF or WMF) are Windows-native graphics formats. macOS uses different graphics rendering engines (like PDF or PICT). Because Excel for Mac does not fully support the Windows metafile clipboard format, the application throws Run-time Error 438.
Why does the Mac clipboard sometimes report as empty during VBA macros?
Mac clipboard syncing between applications can be slower than on Windows. When VBA code executes faster than the clipboard updates, the system may return an empty clipboard error. Adding a brief pause or the `DoEvents` command in your code can give the clipboard time to catch up.
Is there a way to paste an object as a picture without using PasteSpecial?
Yes, you can use the `.CopyPicture` method on the source object to copy it directly as an image into the system clipboard. Afterward, you can simply use `ActiveSheet.Paste` at the destination without needing to specify a complex paste format.




