[VB Macro] Powerpoint wont show form

Discussion in 'Web Design & Coding' started by ZeroHour, Oct 27, 2004.

  1. ZeroHour

    ZeroHour ho3 ho3 ho3

    Messages:
    1,118
    Location:
    Scotland
    [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
     
  2. ZeroHour

    ZeroHour ho3 ho3 ho3

    Messages:
    1,118
    Location:
    Scotland
    Fixed *