Consulting

Results 1 to 2 of 2

Thread: Solved: Grid lines reappear after running macros

  1. #1
    VBAX Regular
    Joined
    Dec 2005
    Posts
    99
    Location

    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?



    Edit:
    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
    Administrator
    Chat VP
    VBAX Guru johnske's Avatar
    Joined
    Jul 2004
    Location
    Townsville, Australia
    Posts
    2,872
    Location
    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
  •