|
您好,请看下 试不是这样子。不过功能很不完善,也不知道你的具体要求的。 ,工作表里find函数, 在VBA里是使用Instr这个函数的功能一样。
Private Sub CommandButton1_Click()
Dim a#, b#, c#, str, k#
a = TextBox1.Value
b = TextBox2.Value
Rng = 0.236
k = (a + (b - a) * Rng)
str = InStr(k, ".")
c = Int(k) + Mid(k, str, 3)
TextBox3.Value = c
End Sub |
|