+ Reply to Thread
Results 1 to 3 of 3

Does ScreenUpdating affect the CopyPicture method?

  1. #1
    Registered User
    Join Date
    12-02-2012
    Location
    Provo, Utah
    MS-Off Ver
    Excel 2010
    Posts
    2

    Question Does ScreenUpdating affect the CopyPicture method?

    I am using a macro in one of my documents that unhides a specific worksheet, copies a range to the user's clipboard as a bitmap image, and returns to the to the sheet that was active when the macro was executed.

    Running the macro while Application.ScreenUpdating = True does exactly what I want it do and I am able to paste the picture with a simple CTRL+V once the macro is finished. I don't, however, want the user to see what is happening when they click the button that triggers the macro so I added Application.ScreenUpdating = False as the first line of the macro and Application.ScreenUpdating = True as the last line of the macro.

    This accomplishes the desired effect of not showing the user what is happening behind the scenes, but it pastes a blank picture when I press CTRL+V after the macro has been executed.

    Any thoughts?

    My code is below:

    Please Login or Register  to view this content.

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Does ScreenUpdating affect the CopyPicture method?

    Hi,

    I don't observe that behaviour. I can run the macro and then hit Ctrl-V and the picture appears.

    Please upload your workbook so that we can see your request in context.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    12-02-2012
    Location
    Provo, Utah
    MS-Off Ver
    Excel 2010
    Posts
    2

    Question Re: Does ScreenUpdating affect the CopyPicture method?

    Here's the workbook. Run the macro (copyRaceEthnicityChart) with the "Outputs" sheet (which will be hidden when you open the file) activated and it should paste a blank chart when you press CTRL+V.

    Affordable Housing Forecast Tool.xlsm

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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