lior03
02-19-2006, 03:42 AM
hello
i am trying to shade every second row in a selection with color , both font and interior.how do i use application.dialogs to allow the user to pick colors,for the font and the interior.
thanks
Application.ScreenUpdating = False
selection.CurrentRegion.Select
selection.FormatConditions.Delete
selection.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=MOD(ROW(),2)=0"
selection.FormatConditions(1).Interior.ColorIndex = x
x = Application.Dialogs(xlDialogFormatText).Show
selection.FormatConditions(1).Font.ColorIndex = Y
Y = Application.Dialogs(xlDialogFontProperties).Show
Cells(1, 1).Select
Application.ScreenUpdating = True
End Sub
i am trying to shade every second row in a selection with color , both font and interior.how do i use application.dialogs to allow the user to pick colors,for the font and the interior.
thanks
Application.ScreenUpdating = False
selection.CurrentRegion.Select
selection.FormatConditions.Delete
selection.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=MOD(ROW(),2)=0"
selection.FormatConditions(1).Interior.ColorIndex = x
x = Application.Dialogs(xlDialogFormatText).Show
selection.FormatConditions(1).Font.ColorIndex = Y
Y = Application.Dialogs(xlDialogFontProperties).Show
Cells(1, 1).Select
Application.ScreenUpdating = True
End Sub