+ Reply to Thread
Results 1 to 5 of 5

VBA to disable gridlines

Hybrid View

  1. #1
    Registered User
    Join Date
    04-30-2017
    Location
    Pretoria, South Africa
    MS-Off Ver
    2013
    Posts
    54

    VBA to disable gridlines

    Hey all

    Whats wrong with my code to remove gridlines? :

    
    Sub formatting()
    
    With Worksheets("Lists - Global")
        .DisplayGridlines = False
        
    End With
    
    
    End Sub

  2. #2
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,300

    Re: VBA to disable gridlines

    hi muktar888
    Try
    Sub formatting()
    With Sheets("Lists - Global")
        ActiveWindow.DisplayGridlines = False
    End With
    End Sub
    Good Luck
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the star to left of post [Add Reputation]
    Also....add a comment if you like!!!!
    And remember...Mark Thread as Solved.
    Excel Forum Rocks!!!

  3. #3
    Registered User
    Join Date
    04-30-2017
    Location
    Pretoria, South Africa
    MS-Off Ver
    2013
    Posts
    54

    Re: VBA to disable gridlines

    Quote Originally Posted by sintek View Post
    hi muktar888
    Try
    Sub formatting()
    With Sheets("Lists - Global")
        ActiveWindow.DisplayGridlines = False
    End With
    End Sub
    Thats it!

    Gees how do you guys know when to add these things?

    Much appreciated!

  4. #4
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,300

    Re: VBA to disable gridlines

    By being taught by others....lol
    thanks for rep point and for marking thread as solved....

  5. #5
    Registered User
    Join Date
    04-30-2017
    Location
    Pretoria, South Africa
    MS-Off Ver
    2013
    Posts
    54

    Re: VBA to disable gridlines

    So i guess its baby steps for me.

    Thanks for teaching!

+ 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. No gridlines yet gridlines are turned on
    By Curious Dude in forum Excel General
    Replies: 3
    Last Post: 03-03-2014, 09:35 PM
  2. Replies: 1
    Last Post: 06-16-2013, 12:35 AM
  3. Replies: 0
    Last Post: 08-15-2012, 08:13 AM
  4. Vertical Minor Gridlines Overlap Horizontal Major Gridlines
    By dsalzman in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 03-13-2012, 11:49 AM
  5. Enable/disable copy paste (disable part not working)
    By timtim89 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-08-2012, 07:23 PM
  6. In Excel, gridlines won't print--File,PageSetup,Sheet,Gridlines--
    By 4most in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 07-10-2006, 03:34 AM
  7. [SOLVED] In Excel, gridlines won't print--File,PageSetup,Sheet,Gridlines--
    By 4most in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 07-10-2006, 03:29 AM

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