In an Excel 2000 application I gave the user a button to click when they are ready to total the section they are working on (I use a Case statement for placement of the formulas. An array is also involved because I am adding this Total row to each of 15 sheets in the workbook). The formula part works fine.
I also want each total row on each sheet to be in bold. I format the sheet with lines which works - but the bold part isn't working. I tried recording it and using that but maybe because of the array it isn't right?
I tried: Selection.Font.Bold = True
which doesn't work and I also tried adding:
.Font.Bold = True
where it does the border lines but that doesn't work either. Only the lines appear.
See part of what I have below.
Thanks for any ideas you have.
Case 36 'Period 6
Worksheets(vArrSh(sh)).Range("F36").Value = "=Sum(F32:F35)"
Worksheets(vArrSh(sh)).Range("G36").Value = "=B36/F36"
Worksheets(vArrSh(sh)).Range("H36").Value = "=D36/F36"
Selection.Font.Bold = True
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
.Font.Bold = True
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
I also want each total row on each sheet to be in bold. I format the sheet with lines which works - but the bold part isn't working. I tried recording it and using that but maybe because of the array it isn't right?
I tried: Selection.Font.Bold = True
which doesn't work and I also tried adding:
.Font.Bold = True
where it does the border lines but that doesn't work either. Only the lines appear.
See part of what I have below.
Thanks for any ideas you have.
Case 36 'Period 6
Worksheets(vArrSh(sh)).Range("F36").Value = "=Sum(F32:F35)"
Worksheets(vArrSh(sh)).Range("G36").Value = "=B36/F36"
Worksheets(vArrSh(sh)).Range("H36").Value = "=D36/F36"
Selection.Font.Bold = True
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
.Font.Bold = True
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With