Setting "DisplayGridlines" Programmatically

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to set the "DisplayGridlines" property of a worksheet
programmatically. I am getting an error when using:

Worksheets(<name of a valid sheet>).DisplayGridlines = False

The error is:

Runtime error '438'
Object doen't support this property or method

How may I accomplish this task without error? Thanks and God bless.
 
Doug,

Gridlines applies to the window object, so use

Activewindow.Displaygridlines = False

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
Hello,

Correct syntax is :

ActiveWindow.DisplayGridlines = False


Cesar Zapata
 
Just a hint, turn on the macro recorder and do it manually. Then your
question would be answered.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top