+ Reply to Thread
Results 1 to 5 of 5

Remove gridline from single worksheet

  1. #1
    Registered User
    Join Date
    06-23-2011
    Location
    Little China
    MS-Off Ver
    Excel 2007
    Posts
    3

    Remove gridline from single worksheet

    *Edit* Thank you Leath and Jeff. I suspected it was not possible; my next question would have been about the grid color . Thanks again.


    Hello.

    I need to do the following:
    -Add and name worksheet (works)
    -Add object to worksheet from pc (works)
    -Remove gridlines from new worksheet only (ActiveWindow command applies to all worksheets)

    Below is the code I have tried. I commented each line. Do you have any suggestions?

    Please Login or Register  to view this content.
    Thank you for your time,
    -Kurt
    Last edited by KURT-RUSSELL; 06-24-2011 at 05:36 PM. Reason: [SOLVED]

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Remove gridline from single worksheet

    Hello Kurt,

    The GridLines property applies only the Window object. Since the Window is responsible for displaying the worksheets, you won't be able to apply this to a single sheet. However, you can change the GridLine color on a worksheet. You can hide them by making the same color as your worksheet's background color.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,327

    Re: Remove gridline from single worksheet

    Hi Leith,

    It seems this worked for the active workbook or maybe I don't quite understand.

    Please Login or Register  to view this content.
    HTH
    Regards, Jeff

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Remove gridline from single worksheet

    Hello Jeff and Kurt,

    I should have provided an example. Here is a macro to hide the grid lines. It changes the borders to match the cell's color.
    Please Login or Register  to view this content.

  5. #5
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,327

    Re: Remove gridline from single worksheet

    Thanks Leith,

    I see it now...I was just turning off the DisplayGridlines; however, you are hiding it with a color all together.

    Thank you for the direction.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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