Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 789
Default 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


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing background colour when changing data in a cell Paoul Excel Discussion (Misc queries) 7 December 26th 08 07:25 AM
Changing colour intensity in Excell 2007 GeorgeT Excel Discussion (Misc queries) 0 October 3rd 07 06:00 PM
Changing a cell colour fatdave Excel Discussion (Misc queries) 2 November 9th 06 08:44 AM
changing cell colour on click Nimbus55 Excel Discussion (Misc queries) 3 September 1st 05 01:18 PM
Changing Cell Colour Audrey Ng Excel Programming 3 December 16th 03 02:58 PM


All times are GMT +1. The time now is 08:37 AM.

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

About Us

"It's about Microsoft Excel"