Forum Discussion

JimK's avatar
JimK
Copper Contributor
Feb 13, 2025
Solved

Import Tab Delimited File from Clipboard

I'm looking to create a macro in excel to import a file from clipboard.  I have tried to record a macro and that did not work.  I do not want to enter a file name.  I would like to copy from notepad ...
  • SnowMan55's avatar
    Feb 14, 2025

    See the attached workbook.

    The Clipboard data is retrieved using Windows API calls.  The parsing/splitting of the text is done using VBA's Split function.  (The code is written for readability, not highest performance.)

Resources