0

目前我的代码导致崩溃。

Sub headerDate()
Dim iReply As String

iReply = Application.InputBox("What is the input? ")
With ActiveSheet.pageSetup
    .CenterHeader = ""
    .RightHeader = _
    "                        Doc. No.: " & str(iReply) & Chr(10) & "Version: 2.3 (Modification f)" & Chr(10) & "Valid as of: 12/31/2012  "
End With
Application.PrintCommunication = True
Range("BI2").Select
End Sub
4

1 回答 1

1

我认为您需要将 Str 更改为 Cstr:

"Doc. No.: " & CStr(iReply) & Chr(10) & "Version: 2.3 (Modification f)" & Chr(10) ...
于 2012-12-11T01:39:16.897 回答