#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 63
Default Grid Line

Hi,
While running a macro in a new worksheet for grid line an error occured and
while debugging " .LineStyle = xlContinuous "

Thanks in advance
Ravi Kumar
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,124
Default Grid Line


Perhaps you could share more of the code.
--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Ravi" wrote in message
...
Hi,
While running a macro in a new worksheet for grid line an error occured
and
while debugging " .LineStyle = xlContinuous "

Thanks in advance
Ravi Kumar


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 63
Default Grid Line

here is the code

Sub line()
'
' line Macro
' Macro recorded 7/23/2008 by ravikumart
'
' Keyboard Shortcut: Ctrl+Shift+W
'
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlInsideVertical)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlInsideHorizontal)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
End Sub



"Don Guillett" wrote:


Perhaps you could share more of the code.
--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Ravi" wrote in message
...
Hi,
While running a macro in a new worksheet for grid line an error occured
and
while debugging " .LineStyle = xlContinuous "

Thanks in advance
Ravi Kumar



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,124
Default Grid Line

It appears you didn't have enough code doing it that way. Try this. If you
don't want the border around simply comment it out or remove the line.

Sub DoBorders()
With Selection
.Borders.LineStyle = xlContinuous
.BorderAround Weight:=xlMedium
End With
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Ravi" wrote in message
...
here is the code

Sub line()
'
' line Macro
' Macro recorded 7/23/2008 by ravikumart
'
' Keyboard Shortcut: Ctrl+Shift+W
'
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlInsideVertical)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlInsideHorizontal)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
End Sub



"Don Guillett" wrote:


Perhaps you could share more of the code.
--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Ravi" wrote in message
...
Hi,
While running a macro in a new worksheet for grid line an error
occured
and
while debugging " .LineStyle = xlContinuous "

Thanks in advance
Ravi Kumar




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
How do I permanently set grid line color InstructorJim Excel Discussion (Misc queries) 4 June 19th 08 09:48 PM
Excel 2007 - "Snap To Grid" doesn't work on same grid line rwhtx Excel Discussion (Misc queries) 0 November 14th 07 03:40 PM
The grid line disappear when I type in the cell faylene Excel Discussion (Misc queries) 1 October 8th 06 01:33 AM
how doi create a grid chart so i can plot a line ? DEBBIE Charts and Charting in Excel 1 February 23rd 06 05:31 PM
How do I slant grid line at top of each column? dick41ross Excel Discussion (Misc queries) 4 August 24th 05 11:51 PM


All times are GMT +1. The time now is 01:11 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"