Results 1 to 2 of 2

Thread: Solved: Grid lines reappear after running macros

  1. #1
    VBAX Regular
    Dec 2005

    Solved: Grid lines reappear after running macros

    How does one keep grid lines hidden and retain a white sheet?

    I've whited out the grid lines, but then after running my macros (with clear or delete cells routines) the grid lines reappear. Is there a better way than inserting a cell color formatting routine at the end of each macro?

    I just checked in Tools/Options and oddly, the gridlines checkbox is ticked, when I'm certain I unchecked it. Oh well.
    Last edited by zest1; 03-31-2006 at 11:58 PM. Reason: Solved

  2. #2
    Chat VP
    VBAX Guru johnske's Avatar
    Jul 2004
    Townsville, Australia
    Perhaps there's some code somewhere putting DisplayGridlines = True? Put in ThisWorkBook code module:[VBA]Option Explicit

    Private Sub Workbook_SheetActivate(ByVal Sh As Object)
    ActiveWindow.DisplayGridlines = False
    End Sub[/VBA]
    You know you're really in trouble when the light at the end of the tunnel turns out to be the headlight of a train hurtling towards you

    The major part of getting the right answer lies in asking the right question...

    Made your code more readable, use VBA tags (this automatically inserts [vba] at the start of your code, and [/vba ] at the end of your code) | Help those helping you by marking your thread solved when it is.

Posting Permissions

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