Home |
Search |
Today's Posts |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Changing background colour when changing data in a cell | Excel Discussion (Misc queries) | |||
Changing colour intensity in Excell 2007 | Excel Discussion (Misc queries) | |||
Changing a cell colour | Excel Discussion (Misc queries) | |||
changing cell colour on click | Excel Discussion (Misc queries) | |||
Changing Cell Colour | Excel Programming |