# Microsoft Office Application Help - Excel Help forum > Excel Programming / VBA / Macros >  >  How to make white background

## narayana_ou@yah

I have a requirement to make the background of a excal sheet white.
It should not show any grid of lines.
How to make this in VBA.

I did it like



```
Please Login or Register  to view this content.
```


But this code will effect only the cells from A1 to AZ1000.
is there any generic code to make the complete worksheet's background as white.
Thanks,
lakshmi

----------


## Simon Lloyd

if you just want to get rid off the gridlines go to Tools, Options, View and remove the "tick" from the GridLines checkbox!

----------


## bhofsetz

Replace the Range("A1:AZ1000") with Cells




```
Please Login or Register  to view this content.
```


HTH

----------


## royUK

You really only need Simn's suggestion. If you want code you could have used the macro recorder whilst following Simon's suggestion. 

Here's three ways to use VBA to achieve this




```
Please Login or Register  to view this content.
```

----------


## Simon Lloyd

Thanks Roy!, a word of warning Narayana, using 



> Replace the Range("A1:AZ1000") with Cells
> 
> 
> Code:
> Sub main()
> Cells.Borders.LineStyle = xlLineStyleNone
> Cells.Interior.Pattern = xlPatternSolid
> Cells.Interior.PatternColor = RGB(255, 255, 255)
> End Sub



will result in the size of your workbook expanding but following 



> 'Toggle on or off
>     ActiveWindow.DisplayGridlines = Not ActiveWindow.DisplayGridlines
>     'hide Gridlines
>     ActiveWindow.DisplayGridlines = False
>     'display gridlines
>     ActiveWindow.DisplayGridlines = True



will hardly make any difference to size whatsoever and following 



> Tools, Options, View and remove the "tick" from the GridLines checkbox



will make no size difference!

----------

