您好我希望我的代码在文本框中返回随机名称,但它总是给我一个错误。这是我的代码:
Private Sub CommandButton1_Click()
TextBox1.Text = Evaluate(Choose(RandBetween(1, 3), "Kwezi", "MAy", "FR"))
TextBox2.Text = Evaluate(Choose(RandBetween(1, 3), "Kwezi", "MAy", "FR"))
TextBox3.Text = Evaluate(Choose(RandBetween(1, 3), "Kwezi", "MAy", "FR"))
End Sub
答案 0 :(得分:1)
Private Sub CommandButton1_Click()
TextBox1.Text = Choose(WorksheetFunction.RandBetween(1, 3), "Kwezi", "MAy", "FR")
TextBox2.Text = Choose(WorksheetFunction.RandBetween(1, 3), "Kwezi", "MAy", "FR")
TextBox3.Text = Choose(WorksheetFunction.RandBetween(1, 3), "Kwezi", "MAy", "FR")
End Sub