Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Vlookup, if statement, maybe an and statement | Excel Discussion (Misc queries) | |||
IF statement inside a SUMIF statement.... or alternative method | Excel Worksheet Functions | |||
Reconcile Bank statement & Credit card statement & accounting data | Excel Worksheet Functions | |||
Embedding an OR statement in an IF statement efficiently | Excel Discussion (Misc queries) | |||
appending and IF statement to an existing IF statement | Excel Worksheet Functions |