+ Reply to Thread
Results 1 to 8 of 8

Print embedded active x object via vba

  1. #1
    Valued Forum Contributor
    Join Date
    03-17-2007
    Location
    Michigan
    MS-Off Ver
    Excel 2021
    Posts
    974

    Print embedded active x object via vba

    This workbook was posted in a previous post several days ago, which I find to be pretty interesting; so thanks to the original poster. My question is however that the print functionality for the embedded map (active x) doesn't work and I would like it to. The code presently just prints the address information only and not the map. I'm attaching the workbook but would surely be appreciative if anyone knows any vba coding that would allow for the capture and print of the map section (if possible). Thanks for your time.
    Attached Files Attached Files
    Last edited by lilsnoop; 12-24-2011 at 10:22 PM.

  2. #2
    Valued Forum Contributor
    Join Date
    03-17-2007
    Location
    Michigan
    MS-Off Ver
    Excel 2021
    Posts
    974

    Re: Is it possible to print embedded active x object via vba?

    It appears from the lack of responses..that printing the embedded map is not possible. Any chance vba coding could be used to somehow capture the map image like via a print screen function but just of the map image and then save the image to a folder as a jpeg? Thanks for any/all input!

  3. #3
    Valued Forum Contributor
    Join Date
    03-17-2007
    Location
    Michigan
    MS-Off Ver
    Excel 2021
    Posts
    974

    Re: Is it possible to print embedded active x object via vba?

    I've been searching the web trying to figure out how I can get this to print out or do a "print screen" type effect to eventually be able to print out the map portion, etc. I'm attaching a modified example of some vba code that is suppose to do a "print screen" then copy image to new workbook, but I'm getting the following error message "Clipboard corrupted, possibly by another task". The code is placed in a module, which can be activated by a button in my example-some comments edited to meet required posting limits:
    Please Login or Register  to view this content.
    Any help getting this code to work properly would be greatly appreciated!
    Attached Files Attached Files

  4. #4
    Valued Forum Contributor
    Join Date
    03-17-2007
    Location
    Michigan
    MS-Off Ver
    Excel 2021
    Posts
    974

    Re: Is it possible to print embedded active x object via vba?

    From looking into this further. It appears the "print screen" functionality is working from the vba code posted above as well as it opening up another workbook to paste an image into. Currently it has an empty frame for the image to go into. If one were to however right click on their mouse and click "paste" the image would go into that framed area. So it appears that the code isn't completing the final "paste" function properly...and instead giving a message prompt as dictated in the code.

  5. #5
    Valued Forum Contributor
    Join Date
    03-17-2007
    Location
    Michigan
    MS-Off Ver
    Excel 2021
    Posts
    974

    Re: Is it possible to print embedded active x object via vba?

    Hope everyone has a blessed Holiday season! I've managed to make some changes to the vba coding posted earlier and it now works as hoped! Here is the revised coding:
    Please Login or Register  to view this content.
    Last edited by lilsnoop; 12-25-2011 at 12:26 AM. Reason: tweaked code a little more

  6. #6
    Forum Contributor
    Join Date
    11-08-2011
    Location
    Leeds
    MS-Off Ver
    Excel 2010
    Posts
    279

    Re: Is it possible to print embedded active x object via vba?

    I cant get this to work for me, anyone have a working workbook.

    Thanks

  7. #7
    Valued Forum Contributor
    Join Date
    03-17-2007
    Location
    Michigan
    MS-Off Ver
    Excel 2021
    Posts
    974

    Re: Is it possible to print embedded active x object via vba?

    See if this example attachment will do the job for you.
    Attached Files Attached Files

  8. #8
    Forum Contributor
    Join Date
    11-08-2011
    Location
    Leeds
    MS-Off Ver
    Excel 2010
    Posts
    279

    Re: Print embedded active x object via vba

    Thanks I havent tested it yet, The site is blocked at work getting it unblocked now, will let you know how it goes, Thanks for all your work

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1