close

I would like to use a command button for this excel formula

=randbetween(1,100)

Hi,

gt;I would like to use a command button for this excel formula
gt; =randbetween(1,100)Try:

'=============gt;gt;
Private Sub CommandButton1_Click()
Selection.Formula = quot;=RandBetween(1,100)quot;
End Sub
'lt;lt;=============---
Regards,
Norman
I'm sorry what I meant was Cells(3,3) = randbetween(1,100)

quot;Norman Jonesquot; wrote:

gt; Hi,
gt;
gt; gt;I would like to use a command button for this excel formula
gt; gt; =randbetween(1,100)
gt;
gt;
gt; Try:
gt;
gt; '=============gt;gt;
gt; Private Sub CommandButton1_Click()
gt; Selection.Formula = quot;=RandBetween(1,100)quot;
gt; End Sub
gt; 'lt;lt;=============
gt;
gt;
gt; ---
gt; Regards,
gt; Norman
gt;
gt;
gt;

Hi Need help with sumif,

gt; I'm sorry what I meant was Cells(3,3) = randbetween(1,100)

Try:

'=============gt;gt;
Private Sub CommandButton1_Click()
Me.Cells(3,3).Formula = quot;=RandBetween(1,100)quot;
End Sub
'lt;lt;=============---
Regards,
Norman

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 software 的頭像
    software

    software

    software 發表在 痞客邦 留言(0) 人氣()