Thread: Help with VBA
View Single Post
  #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