+ Reply to Thread
Results 1 to 4 of 4

Ghost buttons ???

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    01-08-2017
    Location
    Salt Lake City, Ut.
    MS-Off Ver
    2019 and 365
    Posts
    140

    Question Ghost buttons ???

    I have a problem that I call ghost buttons that appear when I run certain routines.

    During various routines I hide the workbook, and then run a progress bar which increases the progress until the routine is finished and then unhide the workbook. When I run these routine, any buttons that I may have clicked on prior to running the selected routine, will appear momentarily in the (Blank) hidden workbook page and then go away.

    I have tried many different routines to stop this from occurring, such as:
    stopping screen updating
    making all button invisible as the routine is ran.

    It does not seem to matter what I do, the ghost buttons appears at the beginning in the Hide workbook window.

    Has anyone ever seen this, or do you have any suggestions that may keep this from happening.

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,651

    Re: Ghost buttons ???

    I haven't tried this but one idea is to select a sheet that doesn't have any buttons on it then hide the workbook. When you unhide the workbook, reselect the "buttons" sheet.

    Another idea is to use Form-type buttons instead of ActiveX-type buttons.
    Overview of forms, Form controls, and ActiveX controls on a worksheet
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Forum Contributor
    Join Date
    01-08-2017
    Location
    Salt Lake City, Ut.
    MS-Off Ver
    2019 and 365
    Posts
    140

    Re: Ghost buttons ???

    Thank you, I will give the first idea a try, the second would be more difficult as I have probably in excess of 50 active X controls spread across multiple sheets.

  4. #4
    Forum Contributor
    Join Date
    01-08-2017
    Location
    Salt Lake City, Ut.
    MS-Off Ver
    2019 and 365
    Posts
    140

    Re: Ghost buttons ???

    I tried the idea of selecting a sheet that does not have any buttons before hiding my WB, but that did not work. I also tried using this code
     
     Sub HideOLEObjects1()
    'Hide all ActiveX controls(Control Toolbox)or linked or embedded OLE objects
        On Error Resume Next
        ActiveSheet.OLEObjects.Visible = False
        Sheets("Jan").OLEObjects.Visible = False
        On Error GoTo 0
    End Sub
    and the reverse where False is changed to True. It does work well in hiding the activeX controls, but I still get the ghost shadows when hiding the workbook.

    After a little more research and seeing other comments about the downfalls of using active X controls, then I agree with you that form controls would be better. So, I have a lot of work ahead of me to rebuild this WB with button form controls. I only have about 98 of them spread out across multiple sheets... so it will take me awhile. Lesson learned, unfortunately the hard way.

    Thanks AlphaFrog.

+ 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] Ghost Add-In
    By jomili in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-10-2019, 05:04 AM
  2. Macros with buttons, spin buttons, scroll buttons, etc.
    By qqbbppdd in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-12-2013, 09:34 AM
  3. Ghost hyperlink?
    By Romanian37 in forum Excel General
    Replies: 0
    Last Post: 06-21-2012, 05:44 AM
  4. Ghost last cell used
    By Zagrijs in forum Excel General
    Replies: 4
    Last Post: 02-27-2012, 08:00 AM
  5. Ghost Reference
    By pikapika13 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-30-2006, 03:40 PM
  6. [SOLVED] ghost macro
    By gevans in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-08-2006, 12:45 PM
  7. [SOLVED] Ghost of Excel
    By Paul - NottsUK in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 04-05-2005, 03:06 PM

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