Why do I get a Type Mismatch error on this?
Code:Private Sub cmdNext_Click() Randomize a1 = Int((9 * Rnd) + 0) a2 = Int((9 * Rnd) + 0) a3 = Int((9 * Rnd) + 0) a4 = Int((9 * Rnd) + 0) pin = a1 & a2 & a3 & a4 money = 1000 Moneyy = Hex(money) Pinn = Hex(pin) nameo = Replace(txtname.Text, " ", "") ddd = WritePrivateProfileString("gdpslot", "Name", txtname.Text, App.Path & "\Accounts\" & nameo & ".gdp") ddd = WritePrivateProfileString("gdpslot", "Money", Moneyy, App.Path & "\Accounts\" & nameo & ".gdp") ddd = WritePrivateProfileString("gdpslot", "Pin", Pinn, App.Path & "\Accounts\" & nameo & ".gdp") tt = MsgBox("Your PIN Number is: " + pin + " Write it down! You Will Need it!", vbInformation, "PIN Number") tt = MsgBox("$1000 has been added to your account!", vbInformation, "The GDP Slot Machine") Unload NewA End Sub




Reply With Quote