With Statement
Hi,
I am doing something incorrect. With Range("$A$3") ..Text = "Current Configuration" ..Font.Bold = True ..HorizontalAlignment = xlLeft With .Borders(xlEdgeRight) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = xlAutomatic End With End With When the cursor hits the Text line, it crashes with "Run-time error '424': Object required. What am I doing wrong. Also, can I nest a With Statement within a With Statement? Thank you. Regards, Kevin |
With Statement
..Text is read-only for a Range.
Try .Value = instead -- Rob van Gelder - http://www.vangelder.co.nz/excel "Kevin H. Stecyk" wrote in message ... Hi, I am doing something incorrect. With Range("$A$3") .Text = "Current Configuration" .Font.Bold = True .HorizontalAlignment = xlLeft With .Borders(xlEdgeRight) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = xlAutomatic End With End With When the cursor hits the Text line, it crashes with "Run-time error '424': Object required. What am I doing wrong. Also, can I nest a With Statement within a With Statement? Thank you. Regards, Kevin |
With Statement
Range("$C$5").Select
ActiveCell.Value = "Current Configuration" With Selection ..Font.Bold = True ..HorizontalAlignment = xlLeft With .Borders(xlEdgeRight) ..LineStyle = xlContinuous ..Weight = xlMedium ..ColorIndex = xlAutomatic End With End With |
With Statement
Rob van Gelder wrote...
.Text is read-only for a Range. Try .Value = instead -- Rob van Gelder - http://www.vangelder.co.nz/excel Thank you very much Rob. Best regards, Kevin |
With Statement
Chip wrote in message ...
Range("$C$5").Select ActiveCell.Value = "Current Configuration" With Selection .Font.Bold = True .HorizontalAlignment = xlLeft With .Borders(xlEdgeRight) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = xlAutomatic End With End With Thank you very much Chip. Best regards, Kevin |
All times are GMT +1. The time now is 06:05 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com