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
|