Thread: Limit a macro
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
pete pete is offline
external usenet poster
 
Posts: 88
Default Limit a macro

I created a macro to preform this function below. Once
that function is preformed the user has the option of
keeping all or some of the returned data.

How do I make the macro only look at the valid unkeept
data to change. I put in a "check box form" to let the
user select the data to keep, but how do I tell the macro
to ignor that portion of the spread sheet?

Sub ShipCaptCrew()
Randomize
Dim NextRow As Long
Range("Die1") = Int(Rnd() * 6) + 1
Range("Die2") = Int(Rnd() * 6) + 1
Range("Die3") = Int(Rnd() * 6) + 1
Range("Die4") = Int(Rnd() * 6) + 1
Range("Die5") = Int(Rnd() * 6) + 1

Any help will be great.
Thanks
Pete W