Excell and changing cell colour
Hi
Try this (untested)
Sub random_numbers1()
Range("A1:F7").FormulaArray = "=MRAND(42,1,42)"
Range("H5:I6").FormulaArray = "=MRAND(4,1,12)"
End Sub
Regards
Paul
sadsfan wrote:
" wrote:
Hi
In your command button code, try to remove any activates or selections
(which trigger the change event)
e.g you can replace
Range("A1").Select
Selection.Value = 3
with
Range("A1").Value = 3
Post your button code if you are not sure what to replace.
regards
Paul
Thanks Paul here is my button code:
Sub random_numbers1()
Range("A1").Select
Range("A1:F7").Select
FormulaR1C1 = "=MRAND(42,1,42)"
Selection.FormulaArray = "=MRAND(42,1,42)"
Range("H5").Select
Range("H5:I6").Select
FormulaR1C1 = "=MRAND(4,1,12)"
Selection.FormulaArray = "=MRAND(4,1,12)"
End Sub
|