text4,8,12,16,20 运行结果就有%号
回复 楼主 sncelpl
目测是文本格式问题,请把"2%" 改成0.02试试
Private Sub Form_Load() Dim a As Single, b As Single a = Format("13.54%", "0.00####") b = Format("12.34%", "0.00####") c = a + b Debug.Print c MsgBox Format(c, "0.00%") End Sub