【问题标题】:Excel VBA change footer font and font sizeExcel VBA更改页脚字体和字体大小
【发布时间】:2021-07-18 04:27:00
【问题描述】:

以下 Excel VBA 代码会在单元格值更改时自动更改页脚,但 Excel 也会更改字体和大小。我试图保持字体 Arial 和字体大小 10。我该怎么做?谢谢!

Private Sub Worksheet_Change(ByVal Target As Range)
    On Error Resume Next
    If Target.Address = "$E$4" Then
        ActiveSheet.PageSetup.LeftFooter = Range("$G$4").Value
    End If
End Sub

【问题讨论】:

    标签: excel vba footer


    【解决方案1】:

    试试这个:

    ActiveSheet.PageSetup.LeftFooter = "&""Arial""&10" & Range("$G$4").Value
    

    【讨论】:

      猜你喜欢
      • 2015-05-10
      • 2011-06-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-06-25
      • 2013-11-10
      • 2016-07-21
      相关资源
      最近更新 更多