Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default How to stop printing the VB Code Result

I am not a programmer guys, I am using the following code in my Excel worksheet

Private Sub Worksheet_SelectionChange(ByVal Target As Range)

Cells.FormatConditions.Delete
With Target.EntireRow
.FormatConditions.Delete
.FormatConditions.Add Type:=xlExpression, Formula1:="TRUE"
.FormatConditions(1).Borders(xlBottom).LineStyle = xlContinuous
End With

Cells.Interior.ColorIndex = xlColorIndexNone
Target.EntireRow.Interior.ColorIndex = 36

Dim MyRng As Range
Set MyRng = Target '.EntireRow
Application.EnableEvents = False
On Error GoTo end1
'Application.Cells.Font.Size = 10
With MyRng
.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=ROW()=ROW(INDIRECT(CELL(""address"")))"
With .FormatConditions(1).Font
.Bold = True
.Italic = False
.ColorIndex = 1
End With
'.Font.Size = 20
.FormatConditions(1).Interior.ColorIndex = 24
End With
end1:
Application.EnableEvents = True

End Sub

but when I print my worksheet the result which is highlighted row prints
too. I dont want it to print. Can any one please edit this code and stop the
reult from printing.

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
Macro Help (Uppercase multiple ranges?) Ken Excel Discussion (Misc queries) 14 December 2nd 06 07:23 PM
Text formatting Kace Excel Worksheet Functions 1 September 18th 06 08:28 PM
How to convert a number to text conman Excel Discussion (Misc queries) 2 June 8th 06 04:24 AM
spell number JAWAD CHOHAN Excel Worksheet Functions 1 December 12th 05 05:58 PM
EXCEL:NUMBER TO GREEK WORDS vag Excel Worksheet Functions 1 June 15th 05 05:57 PM


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