+ Reply to Thread
Results 1 to 8 of 8

Custom Toolbar blanks cells problem

  1. #1
    Registered User
    Join Date
    06-08-2005
    Location
    Kildare, Ireland
    MS-Off Ver
    Windows/Office 365
    Posts
    41

    Custom Toolbar blanks cells problem

    In a workbook (10 sheets) I have one sheet ("Input") with a custom toolbar. I have code which hides this toolbar when other sheets are selected.
    When I revert back to the the "Input" sheet most of the cells are blank and the sheet generally distorted. If I disable the custom toolbar the problem is gone. Also, I have discovered that if I place the custom toolbar in the first row of toolbars (eg, beside "Standard" toolbar) then the problem does not occur. It happens only if the first toolbar row is full and the code tries to add the custom toolbar (and place it in the second toolbar row).
    Can anyone help?
    Excel 2003

    DesM

  2. #2
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,946

    Re: Custom Toolbar blanks cells problem

    "I have code" should be, instead, "Here's the code that I use...." ;-)
    Bernie Deitrick
    Excel MVP 2000-2010

  3. #3
    Registered User
    Join Date
    06-08-2005
    Location
    Kildare, Ireland
    MS-Off Ver
    Windows/Office 365
    Posts
    41

    Re: Custom Toolbar blanks cells problem

    Goodness Bernie. And you're a "Valued Forum Contributor"
    Des M

  4. #4
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,946

    Re: Custom Toolbar blanks cells problem

    But you need to post your code. Otherwise, nobody can help you. That was my point.

  5. #5
    Registered User
    Join Date
    06-08-2005
    Location
    Kildare, Ireland
    MS-Off Ver
    Windows/Office 365
    Posts
    41

    Re: Custom Toolbar blanks cells problem

    Oh Bernie, I'm very sorry.
    Here is the code:

    Option Explicit
    Private Sub Worksheet_Activate()
    ActiveWindow.FreezePanes = False
    Application.Toolbars("Accounts").Visible = True
    ActiveWindow.FreezePanes = True
    Application.ScreenUpdating = True[/INDENT]End Sub
    ====================
    Private Sub Worksheet_Deactivate()
    Application.Toolbars("Accounts").Visible = False
    End Sub

  6. #6
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,946

    Re: Custom Toolbar blanks cells problem

    Try just this
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    06-08-2005
    Location
    Kildare, Ireland
    MS-Off Ver
    Windows/Office 365
    Posts
    41

    Re: Custom Toolbar blanks cells problem

    Bernie, thanks ever so much.
    I've tried your code but no luck.
    I opened a new WB and pasted the "Input" sheet into it (using select all cells, copy, paste). The macro works fine.
    From this I am assuming that there is some bug/corruption in the WB itself as I understand can happen. I think I will just copy over each sheet.
    Thank you again for your assistance and my apologies for my earlier comment.

    Des M

  8. #8
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,946

    Re: Custom Toolbar blanks cells problem

    Sometimes workbooks become corrupt, for any of a variety of reasons, so starting new was a good idea.

+ 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. Replies: 5
    Last Post: 07-31-2013, 01:50 AM
  2. Replies: 0
    Last Post: 02-21-2013, 08:28 AM
  3. Custom toolbar sharing problem
    By emmamaki in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-16-2007, 03:16 AM
  4. Custom Toolbar Button Problem
    By cvolkert in forum Excel General
    Replies: 1
    Last Post: 09-07-2006, 05:47 AM
  5. Replies: 0
    Last Post: 01-19-2006, 04:45 PM

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