使文字字体粗体

时间:2016-11-04 21:45:41

标签: text fonts vb6

当我尝试用

加粗文本字体时
ActiveSheet.Range("C2:G2").Select 
With Selection
   .Merge
   .Value = "Dealer Commission Rate"
   .HorizontalAlignment = xlCenter
   .VerticalAlignment = xlCenter
   .WrapText = True
   .Font.Name = "Arial"
   .Font.Size = 11
   .Font.Bolt = True
End With
在VB6中,我一直收到这个警告:

  

“选择包含多个数据值。合并到一个单元格中   将仅保留左上角的数据“

另一个问题是因为该行。Font.Bolt = True

error#:438 "Object doesn't support this property or method.

如何禁止警告并获取文本字体螺栓?

1 个答案:

答案 0 :(得分:1)

你正在写

.Font.Bolt = True

尝试 .Font.Bold = True

相关问题