• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

[VB Macro] Powerpoint wont show form

#1
[VB Macro][FIXED] Powerpoint wont show form

Hi
Got a powerpoint button and it has this code on click
Code:
Private Sub CommandButton1_Click()
StdToSciLarge.Show
End Sub
Which is supposed to show the following form
Code:
Dim p, d, p_student As Integer
Dim a, X, a_student As Single
Dim p_right, a_right As Boolean

Private Sub Correct()
If (a_right) Then
    TextBox7.Text = "Well done!"
    TextBox5.Text = ""
Else
    TextBox7.Text = ""
End If
End Sub
Private Sub CommandButton1_Click()

Randomize
Rem random number for power between 10 and 4
p = Int((8 * Rnd) + 1)
Rem random number for number of d.p. displayed between 1 and 4
d = Int((3 * Rnd)) + 1
Rem random number for argument 0 to 10
a = Int((9 * Rnd + 1) * 10 ^ d) / (10 ^ d)
X = a * 10 ^ p

p_right = False
a_right = False
TextBox2.Text = ""
TextBox3.Text = a
TextBox4.Text = p
TextBox7.Text = ""
TextBox5.Text = "Fill in the standard notation"
End Sub

Private Sub CommandButton2_Click()
SciToStdLarge.Hide
End Sub

Private Sub TextBox2_Change()
Rem Check that the "number" is a number
If (IsNumeric(TextBox2.Text)) Then
    a_student = TextBox2.Text
    Rem Check that the "number" is between 1 and 10
    If (a_student = X) Then
        TextBox5.Text = "You've got it right"
        a_right = True
    Else
        TextBox5.Text = "The number is not correct"
        a_right = False
    End If
    Rem When answer is correct display appropriate message
    Correct
End If
End Sub



Private Sub TextBox3_Change()

End Sub
The names are correct and I have tried setting macro security to low but it dont work.
This is not something I have coded. A friend sent it to me saying it works on his but not on our network.
Anyone got any ideas?

Cheers
 

Members online

No members online now.

Latest posts

Latest profile posts

Hello, is there anybody in there? Just nod if you can hear me ...
Xie
What a long strange trip it's been. =)

Forum statistics

Threads
61,960
Messages
673,237
Members
89,011
Latest member
grovo_test