logo
search
Excel Error Codes

How to Fix Excel for Mac PasteSpecial Run-time Error 438

Kushani NimanthikaKushani Nimanthika Oct 9, 2026 869 views

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.

How to Fix Excel for Mac PasteSpecial Run-time Error 438
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 you start

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.

Solution 1Recommended

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.

1
Modify the Copy Command

Open your VBA editor and locate the line where the object is copied. Change the standard `.Copy` method to `.CopyPicture`.

2
Update the Paste Command

Find the line using `PasteSpecial` with `ppPasteMetafilePicture` and replace it with a standard `ActiveSheet.Paste` command.

3
Test the Macro

Run the updated script on your Mac to verify if the object pastes successfully without triggering the Run-time error 438.

Replace PasteSpecial with CopyPicture and Standard Paste
Format Compatibility: By using CopyPicture, the object is automatically converted into a compatible image format that the macOS clipboard can handle smoothly.
Free Microsoft Office alternative

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. 1. Download WPS Office: Visit the WPS Office website and download the free installation package for your Mac.
  2. 2. Open Your Spreadsheet: Launch WPS Spreadsheet and open your existing .xlsx or .xlsm file to continue working immediately.
  3. 3. Edit Without Errors: Enjoy a smoother experience with cross-platform editing and robust format compatibility.
Highly compatible with Microsoft Excel (.xlsx, .xls) and standard macro formats.Bypass macOS-specific clipboard errors natively encountered in MS Office.Free, lightweight, and fast on both Windows and macOS.Familiar user interface for a zero-learning-curve transition.
microsoft office alternative - wps office

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.