+ Reply to Thread
Results 1 to 4 of 4

Shapes disappear when macro is run

  1. #1
    Registered User
    Join Date
    02-06-2019
    Location
    London, England
    MS-Off Ver
    Office 365
    Posts
    7

    Shapes disappear when macro is run

    Hi

    I have about 10 shapes on a worksheet. Half of them run VBA when clicked.

    One of the shapes runs a VBA procedure that imports data from another workbook and populates another worksheet (in the workbook with the shapes). However, for part of the time (about 2-3 seconds) whilst the VBA is being run all the shapes disappear.

    Just a few points to make:
    (1) I am not using the copy PasteSpecial method. Instead I am using the following method.
    Worksheets("Sheet1").Range("A1").Resize(rng.Rows.Count, rng.Columns.Count).Cells.Value = rng.Cells.Value

    (2) The following settings have been applied at the start of the VBA:
    Application.ScreenUpdating = False
    Application.EnableEvents = False
    Application.Calculation = xlCalculationManual

    Any help would be REALLY appreciated!

    Many thanks in advance
    Bill

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,473

    Re: Shapes disappear when macro is run

    You need to show the code

  3. #3
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Shapes disappear when macro is run

    Hello BarneyRub,

    It sounds to me like you a DoEvents statement in your code. This will allow Excel to update the worksheet while importing the data from the other workbook.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  4. #4
    Registered User
    Join Date
    02-06-2019
    Location
    London, England
    MS-Off Ver
    Office 365
    Posts
    7

    Re: Shapes disappear when macro is run

    Quote Originally Posted by Leith Ross View Post
    Hello BarneyRub,

    It sounds to me like you a DoEvents statement in your code. This will allow Excel to update the worksheet while importing the data from the other workbook.
    That's great!

    MANY thanks Leith - that change has fixed my problem
    Bill

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Help!!Need Macro which don't allow any value to disappear.
    By prakash24 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 11-28-2017, 12:00 AM
  2. Macro: Check-boxes to disappear
    By snakeCZ in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-01-2014, 08:25 AM
  3. Exporting as PDF causing Shapes and Controls to disappear from sheet
    By VBA FTW in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-15-2014, 06:49 PM
  4. [SOLVED] Need Help in Macro: Appear a Picture for few seconds and Disappear
    By vij8y in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-26-2012, 02:20 PM
  5. How To Move Shapes From Another Shapes? (floating shapes)
    By MarcLev in forum Word Programming / VBA / Macros
    Replies: 2
    Last Post: 10-04-2009, 04:04 PM
  6. Macro Disappear
    By dayaptl in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-23-2007, 08:46 AM
  7. Shapes disappear from Excel 2000 to 2003?
    By Cheer in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-01-2005, 03:06 AM

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