我遇到一个问题,即excel正在用框符号中的重复问号替换所有正在复制的文本。只有1个用户才会认为这可能是此用户的设置问题,但生成正在替换的文本的vba代码在下面,以防它是代码本身的问题。任何有关此问题的帮助将不胜感激。谢谢。
编辑:因此所有输入都是通过下拉列表和径向菜单输入的。我让用户使用复制版excel表在其他机器上输入重复信息,没有任何问题让我相信这可能是办公室问题。我还重新安装了办公室,但没有纠正这个问题。
Private Function QTmachineSizes(ByRef Qt As Quote) As String
On Error GoTo ET
Dim s As String: s = "ROUGH MACHINE TO: "
s = s & Qt.TMvals(18) & Chr(13)
s = s & Format(Qt.OD + CDbl(Qt.TMvals(15)), "0.000") & " OD x "
If Qt.ID <> 0 Then
s = s & Format(Qt.ID - CDbl(Qt.TMvals(16)), "0.000") & " ID x " & Format(Qt.THK + CDbl(Qt.TMvals(17)), "0.000") & " THK" & Chr(13)
Else: s = s & Format(Qt.THK + CDbl(Qt.TMvals(17)), "0.000") & " THK DISK" & Chr(13)
End If
s = s & "TOLERANCE: +" & Format(CDbl(Qt.TMvals(9)), "0.000") + "/-" & Format(CDbl(Qt.TMvals(10)), "0.000") & " OD, "
If Qt.ID <> 0 Then s = s & Format(CDbl(Qt.TMvals(11)), "0.000") + "/-" & Format(CDbl(Qt.TMvals(12)), "0.000") & " ID, "
s = s & Format(CDbl(Qt.TMvals(13)), "0.000") & "/-" & Format(CDbl(Qt.TMvals(14)), "0.000") & " THK"
QTmachineSizes = s
和
Private Function QTnonmachineSizes(ByRef Qt As Quote) As String
On Error GoTo ET
Dim s As String: s = ""
Dim OD, ID, THK, i As Double
i = 1
If Qt.Metric Then i = 25.4
OD = (Qt.OD + Qt.ODstock) * i
ID = (Qt.ID - Qt.IDstock) * i
THK = (Qt.THK + Qt.THKstock) * i
If Qt.ID = 0 Then
s = s & Format(Qt.OD, "0.000") & " X " & Format(Qt.THK, "0.000") & " DISK" & " / WE OFFER:" & Chr(13)
s = s & Format(OD, "0.000") & " X " & Format(THK, "0.000")
Else
s = s & Format(Qt.OD, "0.000") & " X " & Format(Qt.ID, "0.000") & " X " & Format(Qt.THK, "0.000") & " / WE OFFER:" & Chr(13)
s = s & Format(OD, "0.000") & " X " & Format(ID, "0.000") & " X " & Format(THK, "0.000")
End If
i = CDbl(Qt.MiscCalc(11))
If Qt.Metric Then
i = i * 25.4
s = s & " (mm)"
End If
s = s & Chr(13) & "TOLERANCE: +/- " & Format(i, "0.000")
If Qt.Metric Then s = s & " mm"
QTnonmachineSizes = s