Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7684669
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T19:04:52+00:00 2026-05-31T19:04:52+00:00

This is an extension to the question I asked here: Get text from clipboard

  • 0

This is an extension to the question I asked here:

Get text from clipboard using GetText – avoid error on empty clipboard

The answer to that question worked fine for avoiding errors with an empty clipboard, but now I find I also have to handle a clipboard that contains only a graphic and no text, and this condition gets past the empty clipboard filter.

So, how can I abort the procedure when there’s only a graphic and no text on the clipboard?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T19:04:53+00:00Added an answer on May 31, 2026 at 7:04 pm

    Well, it took a while, but here’s how to do it.

    Just to restate the problem, I want to extract text from the clipboard using DataObject.GetFromClipboard, with error trapping set to Break on All Errors, and without throwing an error when there’s no text found on the clipboard.

     Sub TEST_getClipText()
        Debug.Print getClipText
     End Sub
     Function getClipText() As String
        Dim DataObj As MsForms.DataObject
        Set DataObj = New MsForms.DataObject 'tnx jp
        Dim V As Variant
        For Each V In Application.ClipboardFormats
           If V = xlClipboardFormatText Then
              DataObj.GetFromClipboard
              getClipText = DataObj.getText(1)
              Exit Function
           End If
        Next V
        MsgBox "No text on clipboard"
     End Function
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is an extension of a question I previously asked here . Long story
Note: This is an extension of an earlier question I asked here: Do additional
Note: This is an extension of an earlier question I asked here: Do additional
I have asked this question earlier, please click here ! this is extension to
This is an extension for this question asked an hour ago. We cannot modify
This is an extension to a question which I asked some time ago. I
This is an extension / next step of this question I asked a few
As an extension to this question here Linking JavaScript Libraries in User Controls I
Sorry for the redundancy, I should've asked this in my previous question here: What's
I know that this question was asked earlier but the OP didn't get any

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.