LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,311
Default Random generator question

I don't think you'll be able to achieve what you want unless you're on
Manual calculation. But as you said, that causes a different issue of
constantly recalculating your random numbers. As you can't keep it from
recalculating, you can write some code to only capture the random numbers
when you click your command button.
For example:

Move your random naumber range to a different location far off to the right
of your worksheet such as columns BA and BB.
Then in your code, copy the current numbers and PasteSpecial to a differnt
location of your worksheet.

So on your command button, your code might be:


Application.Calculate
Range("BA1:BA100").Copy
Range("E1").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:=
_
False, Transpose:=False



HTH,
Paul


"Khanjohn" wrote in message
...
no its on auto as if on manual all the other drop down vlookups wont work(

"PCLIVE" wrote:

Do you have Calculations set to Manual?
Tools-Options-Calculation-Manual


"Khanjohn" wrote in message
...
I am using =INT(RAND()*100)100-1)+1) and have to use F9 function key
fo r
this. Here is problem, anything i put in any other cell changes the
number
IE i change E24 from 20 to 21 and the random number in F16 changes.
The
problem is anoying as it constantly changes. I had hoped to link it to
a
command button so you had to click it but have found no solutions. Any
ideea
how to stop the random generator from randomizing except when F9 is
pushed?
I am VBA and commandbutton stupid that has been proven to me greatly
the
past
couple days.






 
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
Random Generator Richard Champlin Excel Discussion (Misc queries) 15 October 26th 07 09:32 PM
random number generator Barb Excel Discussion (Misc queries) 2 September 22nd 06 11:12 PM
Random Name Generator Smeeg Excel Worksheet Functions 5 March 3rd 06 03:25 PM
random number generator Jose Luis Excel Discussion (Misc queries) 1 June 14th 05 09:41 PM
Random # Generator vamosj Excel Worksheet Functions 0 November 8th 04 07:14 PM


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

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"