-6 c vba translate excel-vba output
我打算打印一个构成字符串和浮点数的输出.例如,我使用D =质量/体积计算了盒子的密度.我现在想生成一个输出"你的盒子的密度是****kg /立方米"
这是如何在C中实现的
printf("The density of your box is %d\n", D);
Run Code Online (Sandbox Code Playgroud)
如何在VBA上实现这一目标?
使用MsgBox带有该Format函数的语句来格式化值:
MsgBox "The density of your box is " & Format(D, "0.00")
Run Code Online (Sandbox Code Playgroud)