Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Address Entire Worksheet as a range

What would be the correct syntax to address an entire worksheet as a range.
What I am doing is using Automation from Access to create, load data into,
and format a worksheet. I have done this several times, but have a new
problem.

The first thing I want to do is make all the borders in the worksheet
invisible.
Normally, the code would be:
xlsheet.range("A1:IV65536").borders.linestype = xllinestypenone
Is there a shortcut way to do this?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default Address Entire Worksheet as a range

cells will select all cells

maybe something like this

With Cells
.Borders(xlDiagonalDown).LineStyle = xlNone
.Borders(xlDiagonalUp).LineStyle = xlNone
.Borders(xlEdgeLeft).LineStyle = xlNone
.Borders(xlEdgeTop).LineStyle = xlNone
.Borders(xlEdgeRight).LineStyle = xlNone
.Borders(xlInsideVertical).LineStyle = xlNone
.Borders(xlInsideHorizontal).LineStyle = xlNone

End With

--


Gary


"Klatuu" wrote in message
...
What would be the correct syntax to address an entire worksheet as a range.
What I am doing is using Automation from Access to create, load data into,
and format a worksheet. I have done this several times, but have a new
problem.

The first thing I want to do is make all the borders in the worksheet
invisible.
Normally, the code would be:
xlsheet.range("A1:IV65536").borders.linestype = xllinestypenone
Is there a shortcut way to do this?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Address Entire Worksheet as a range

Thanks, Gary, Actually, to condense it:
xlsheet.cells.borders.linestyle = xlnone
worked.
When I go to print preview, the borders are all gone; however, in the
workbook I was given to copy, you don't see any grid lines in normal view.
What property do I need to set to make them disappear?

"Gary Keramidas" wrote:

cells will select all cells

maybe something like this

With Cells
.Borders(xlDiagonalDown).LineStyle = xlNone
.Borders(xlDiagonalUp).LineStyle = xlNone
.Borders(xlEdgeLeft).LineStyle = xlNone
.Borders(xlEdgeTop).LineStyle = xlNone
.Borders(xlEdgeRight).LineStyle = xlNone
.Borders(xlInsideVertical).LineStyle = xlNone
.Borders(xlInsideHorizontal).LineStyle = xlNone

End With

--


Gary


"Klatuu" wrote in message
...
What would be the correct syntax to address an entire worksheet as a range.
What I am doing is using Automation from Access to create, load data into,
and format a worksheet. I have done this several times, but have a new
problem.

The first thing I want to do is make all the borders in the worksheet
invisible.
Normally, the code would be:
xlsheet.range("A1:IV65536").borders.linestype = xllinestypenone
Is there a shortcut way to do this?




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Address Entire Worksheet as a range

Never mind, I got it.

xlsheet.activate
xlapp.activewindow.displaygridlines = false

Thanks again for the help.

"Gary Keramidas" wrote:

cells will select all cells

maybe something like this

With Cells
.Borders(xlDiagonalDown).LineStyle = xlNone
.Borders(xlDiagonalUp).LineStyle = xlNone
.Borders(xlEdgeLeft).LineStyle = xlNone
.Borders(xlEdgeTop).LineStyle = xlNone
.Borders(xlEdgeRight).LineStyle = xlNone
.Borders(xlInsideVertical).LineStyle = xlNone
.Borders(xlInsideHorizontal).LineStyle = xlNone

End With

--


Gary


"Klatuu" wrote in message
...
What would be the correct syntax to address an entire worksheet as a range.
What I am doing is using Automation from Access to create, load data into,
and format a worksheet. I have done this several times, but have a new
problem.

The first thing I want to do is make all the borders in the worksheet
invisible.
Normally, the code would be:
xlsheet.range("A1:IV65536").borders.linestype = xllinestypenone
Is there a shortcut way to do this?




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
CAN VLOOKUP SEARCH AN ENTIRE WORKSHEET INSTEAD OF RANGE OF CELLS BROCK8292 Excel Worksheet Functions 4 April 3rd 23 07:42 PM
how to print same address on entire sheet of labels ajeuck Excel Discussion (Misc queries) 2 August 14th 08 08:27 PM
Macro to print a selected range, not entire worksheet James C Excel Discussion (Misc queries) 3 October 19th 05 10:12 PM
Code to copy range vs Copy Entire Worksheet - can't figure it out Mike Taylor Excel Programming 1 April 15th 04 08:34 PM
Copy information from a specific range; not the entire worksheet. Paul Excel Programming 9 October 12th 03 03:41 PM


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

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

About Us

"It's about Microsoft Excel"