#1   Report Post  
Posted to microsoft.public.excel.misc
Need help with sumif
 
Posts: n/a
Default Help with VBA

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

=randbetween(1,100)



  #2   Report Post  
Posted to microsoft.public.excel.misc
Norman Jones
 
Posts: n/a
Default Help with VBA

Hi,

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



Try:

'=============
Private Sub CommandButton1_Click()
Selection.Formula = "=RandBetween(1,100)"
End Sub
'<<=============


---
Regards,
Norman


  #3   Report Post  
Posted to microsoft.public.excel.misc
Need help with sumif
 
Posts: n/a
Default Help with VBA

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

"Norman Jones" wrote:

Hi,

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



Try:

'=============
Private Sub CommandButton1_Click()
Selection.Formula = "=RandBetween(1,100)"
End Sub
'<<=============


---
Regards,
Norman



  #4   Report Post  
Posted to microsoft.public.excel.misc
Norman Jones
 
Posts: n/a
Default Help with VBA

Hi Need help with sumif,

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


Try:

'=============
Private Sub CommandButton1_Click()
Me.Cells(3,3).Formula = "=RandBetween(1,100)"
End Sub
'<<=============


---
Regards,
Norman


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 05:38 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"