Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 127
Default Setting "DisplayGridlines" Programmatically

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.
--
Dr. Doug Pruiett
Good News Jail & Prison Ministry
www.goodnewsjail.org
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Setting "DisplayGridlines" Programmatically

Hello,

Correct syntax is :

ActiveWindow.DisplayGridlines = False


Cesar Zapata

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Setting "DisplayGridlines" Programmatically

Doug,

Gridlines applies to the window object, so use

Activewindow.Displaygridlines = False

--

HTH

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


"Chaplain Doug" wrote in message
...
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.
--
Dr. Doug Pruiett
Good News Jail & Prison Ministry
www.goodnewsjail.org



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Setting "DisplayGridlines" Programmatically

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

--
Regards,
Tom Ogilvy


"Chaplain Doug" wrote in message
...
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.
--
Dr. Doug Pruiett
Good News Jail & Prison Ministry
www.goodnewsjail.org



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
change "true" and "false" to "availble" and "out of stock" inthestands Excel Worksheet Functions 2 July 19th 07 07:05 PM
Count occurences of "1"/"0" (or"TRUE"/"FALSE") in a row w. conditions in the next BCB New Users to Excel 7 May 13th 06 10:02 PM
Programmatically switch off "Variable declaration reqiured" in VBE? Alan Excel Programming 6 December 15th 04 10:31 AM
How to programmatically control "Vary colors by point" Ambrose Excel Programming 0 October 29th 04 11:41 AM


All times are GMT +1. The time now is 02:24 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"