Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
random number in VB
Hi
n=Int((56-1 + 1) * Rnd + 1) n=INT(56*rnd+1) -- Regards Frank Kabel Frankfurt, Germany swatsp0p wrote: I am trying to write a macro that will rename a tab and change the color to a random color. The code I have so far is: ActiveSheet.Name = "my sheet name here" ActiveWorkbook.Sheets("my sheet name here").Tab.ColorIndex = n how can I get the 'n' to be a random number? (I am assuming between 1-56?) TIA |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Addding a Random number to a fixed number..... | Excel Discussion (Misc queries) | |||
How can I match a random number with closest number from sequence? | Excel Worksheet Functions | |||
same number appears in a random number generator | Excel Worksheet Functions | |||
Generating (in a random order)each number once from a given number | Excel Worksheet Functions | |||
How do I find random number in list of random alpha? (Position is. | Excel Discussion (Misc queries) |