如何从用户表格返回公式

发布于 2025-01-29 11:50:52 字数 234 浏览 5 评论 0原文

我正在尝试使用CommandBotton1在TextBox1 X TextBox2中乘以值,因此,如果TextBox1 = 3 and TextBox2 = 2.5 我想将结果视为公式,包括来自textbox1的值2 = 3x2.5 我不想将结果视为值7

private sub commandton1_click() me.textbox3 = me.textbox1 * me.textbox2

end sub sub

I am trying to multiply value in Textbox1 X Textbox2 using commandbotton1, so for example if Textbox1 = 3 and TextBox2 = 2.5
I would like to see result in textBox3 as formula including values from TextBox1&2 =3x2.5
i don't want to see result as value 7

Private Sub CommandButton1_Click()
Me.TextBox3 = Me.TextBox1 * Me.TextBox2

End Sub

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

天生の放荡 2025-02-05 11:50:52

像这样 ?

Private Sub CommandButton1_Click()
  With Me
    .TextBox3.Value = "=" & .TextBox1.Value & " * " & .TextBox2.Value
  End With
End Sub

Like this ?

Private Sub CommandButton1_Click()
  With Me
    .TextBox3.Value = "=" & .TextBox1.Value & " * " & .TextBox2.Value
  End With
End Sub
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文