View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips Bob Phillips is offline
external usenet poster
 
Posts: 10,593
Default small easy userform

Don't bother with a a form, just use an inputbox

Sub Test()
Dim mpRow As Long
Dim mpWord As String
Dim mpResult As Double

mpRow = Int(Rnd() * 4 + 1)
mpWord = Cells(mpRow, "A").Value

mpResult = InputBox("provide a number for " & mpWord)
If mpResult < Cells(mpRow, "B").Value Then

MsgBox "Wrong"
End If

End Sub


--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



"pswanie" wrote in message
...
i got a userform. with a cmdbuton on a sheet named "verify" column a down i
got 50 words. and column b i got 50 difrent combinations of 4 numbers. i
need
the folowing code. 1 when i click the cmdbuton it needs to call the
userform.
2 when it opens up in one block randomly go and pick a word from column a.
3
the user enter a 4 number combination. click the okay buton it verify that
the number combination is in fact the one next to the word picked from
colmn
a. then run macro "editsheet"
phillip