Does this work in the other versions of ppt?
Quote:
Originally Posted by
Paul_Hossler
Well, VBA is not the same thing a VB, but I guess you could say that they're first cousins
Large presentations typically don't cause a problem, even with a lot of VBA
I don't think presentations routinely blocked after maybe 10 pages, even in 2007
But as I have said already, without having something look at, it's very hard to tell what might be wrong
ok...
Here is the first program from ppt 2007, would it still work in more recent versions?
(Actually I know it works, but is there any reason why it would slowly block the program)
The whole project is 70MB is that too much? is that why it starts working poorly after about 100 pages(not 10)?
Code:
Dim i As Integer, Verbe(0 To 14), Trad(0 To 14), finish As Double, starter As Double, grtot As Integer
Sub EmptyText()
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""
TextBox6.Text = ""
TextBox7.Text = ""
TextBox8.Text = ""
TextBox9.Text = ""
TextBox10.Text = ""
TextBox11.Text = ""
TextBox12.Text = ""
TextBox13.Text = ""
TextBox14.Text = ""
TextBox15.Text = ""
TextBox1.ForeColor = RGB(0, 0, 0)
TextBox2.ForeColor = RGB(0, 0, 0)
TextBox3.ForeColor = RGB(0, 0, 0)
TextBox4.ForeColor = RGB(0, 0, 0)
TextBox5.ForeColor = RGB(0, 0, 0)
TextBox6.ForeColor = RGB(0, 0, 0)
TextBox7.ForeColor = RGB(0, 0, 0)
TextBox8.ForeColor = RGB(0, 0, 0)
TextBox9.ForeColor = RGB(0, 0, 0)
TextBox10.ForeColor = RGB(0, 0, 0)
TextBox11.ForeColor = RGB(0, 0, 0)
TextBox12.ForeColor = RGB(0, 0, 0)
TextBox13.ForeColor = RGB(0, 0, 0)
TextBox14.ForeColor = RGB(0, 0, 0)
TextBox15.ForeColor = RGB(0, 0, 0)
End Sub
Function Word(nr As Integer) As String
Trad(0) = "BREAD"
Trad(1) = "EGG"
Trad(2) = "CHEESE"
Trad(3) = "WATER"
Trad(4) = "JUICE"
Trad(5) = "SPOON"
Trad(6) = "FORK"
Trad(7) = "KNIFE"
Trad(8) = "CUP"
Trad(9) = "GLASS"
Trad(10) = "PLATE"
Trad(11) = "BREAKFAST"
Trad(12) = "LUNCH"
Trad(13) = "DINNER"
Trad(14) = "SNACK"
Word = Trad(nr)
End Function
Function Cuvant(nr As Integer) As String
Verbe(0) = "PAINE"
Verbe(1) = "OU"
Verbe(2) = "BRANZA"
Verbe(3) = "APA"
Verbe(4) = "SUC"
Verbe(5) = "LINGURA"
Verbe(6) = "FURCULITA"
Verbe(7) = "CUTIT"
Verbe(8) = "CEASCA"
Verbe(9) = "PAHAR"
Verbe(10) = "FARFURIE"
Verbe(11) = "MIC DEJUN"
Verbe(12) = "PRANZ"
Verbe(13) = "CINA"
Verbe(14) = "GUSTARE"
Cuvant = Verbe(nr)
End Function
Private Sub CommandButton1_Click()
CommandButton3.Enabled = False
If RTrim(LTrim(UCase(TextBox1.Text))) <> Word(0) Then
TextBox1.Text = Word(0)
TextBox1.ForeColor = RGB(0, 128, 0)
grtot = grtot + 1
End If
If RTrim(LTrim(UCase(TextBox2.Text))) <> Word(1) Then
TextBox2.Text = Word(1)
TextBox2.ForeColor = RGB(0, 128, 0)
grtot = grtot + 1
End If
If RTrim(LTrim(UCase(TextBox3.Text))) <> Word(2) Then
TextBox3.Text = Word(2)
TextBox3.ForeColor = RGB(0, 128, 0)
grtot = grtot + 1
End If
If RTrim(LTrim(UCase(TextBox4.Text))) <> Word(3) Then
TextBox4.Text = Word(3)
TextBox4.ForeColor = RGB(0, 128, 0)
grtot = grtot + 1
End If
If RTrim(LTrim(UCase(TextBox5.Text))) <> Word(4) Then
TextBox5.Text = Word(4)
TextBox5.ForeColor = RGB(0, 128, 0)
grtot = grtot + 1
End If
If RTrim(LTrim(UCase(TextBox6.Text))) <> Word(5) Then
TextBox6.Text = Word(5)
TextBox6.ForeColor = RGB(0, 128, 0)
grtot = grtot + 1
End If
If RTrim(LTrim(UCase(TextBox7.Text))) <> Word(6) Then
TextBox7.Text = Word(6)
TextBox7.ForeColor = RGB(0, 128, 0)
grtot = grtot + 1
End If
If RTrim(LTrim(UCase(TextBox8.Text))) <> Word(7) Then
TextBox8.Text = Word(7)
TextBox8.ForeColor = RGB(0, 128, 0)
grtot = grtot + 1
End If
If RTrim(LTrim(UCase(TextBox9.Text))) <> Word(8) Then
TextBox9.Text = Word(8)
TextBox9.ForeColor = RGB(0, 128, 0)
grtot = grtot + 1
End If
If RTrim(LTrim(UCase(TextBox10.Text))) <> Word(9) Then
TextBox10.Text = Word(9)
TextBox10.ForeColor = RGB(0, 128, 0)
grtot = grtot + 1
End If
If RTrim(LTrim(UCase(TextBox11.Text))) <> Word(10) Then
TextBox11.Text = Word(10)
TextBox11.ForeColor = RGB(0, 128, 0)
grtot = grtot + 1
End If
If RTrim(LTrim(UCase(TextBox12.Text))) <> Word(11) Then
TextBox12.Text = Word(11)
TextBox12.ForeColor = RGB(0, 128, 0)
grtot = grtot + 1
End If
If RTrim(LTrim(UCase(TextBox13.Text))) <> Word(12) Then
TextBox13.Text = Word(12)
TextBox13.ForeColor = RGB(0, 128, 0)
grtot = grtot + 1
End If
If RTrim(LTrim(UCase(TextBox14.Text))) <> Word(13) Then
TextBox14.Text = Word(13)
TextBox14.ForeColor = RGB(0, 128, 0)
grtot = grtot + 1
End If
If RTrim(LTrim(UCase(TextBox15.Text))) <> Word(14) Then
TextBox15.Text = Word(14)
TextBox15.ForeColor = RGB(0, 128, 0)
grtot = grtot + 1
End If
finish = Timer
MsgBox ("Ai terminat in " & Int(finish - starter) & "s si ai avut " & grtot & " greseli.")
End Sub
Private Sub CommandButton2_Click()
Call EmptyText
CommandButton3.Enabled = True
CommandButton1.Enabled = False
grtot = 0
finish = 0
starter = Timer
End Sub
Private Sub CommandButton3_Click()
CommandButton1.Enabled = True
If RTrim(LTrim(UCase(TextBox1.Text))) <> Word(0) Then
TextBox1.ForeColor = RGB(256, 0, 0)
End If
If RTrim(LTrim(UCase(TextBox2.Text))) <> Word(1) Then
TextBox2.ForeColor = RGB(256, 0, 0)
End If
If RTrim(LTrim(UCase(TextBox3.Text))) <> Word(2) Then
TextBox3.ForeColor = RGB(256, 0, 0)
End If
If RTrim(LTrim(UCase(TextBox4.Text))) <> Word(3) Then
TextBox4.ForeColor = RGB(256, 0, 0)
End If
If RTrim(LTrim(UCase(TextBox5.Text))) <> Word(4) Then
TextBox5.ForeColor = RGB(256, 0, 0)
End If
If RTrim(LTrim(UCase(TextBox6.Text))) <> Word(5) Then
TextBox6.ForeColor = RGB(256, 0, 0)
End If
If RTrim(LTrim(UCase(TextBox7.Text))) <> Word(6) Then
TextBox7.ForeColor = RGB(256, 0, 0)
End If
If RTrim(LTrim(UCase(TextBox8.Text))) <> Word(7) Then
TextBox8.ForeColor = RGB(256, 0, 0)
End If
If RTrim(LTrim(UCase(TextBox9.Text))) <> Word(8) Then
TextBox9.ForeColor = RGB(256, 0, 0)
End If
If RTrim(LTrim(UCase(TextBox10.Text))) <> Word(9) Then
TextBox10.ForeColor = RGB(256, 0, 0)
End If
If RTrim(LTrim(UCase(TextBox11.Text))) <> Word(10) Then
TextBox11.ForeColor = RGB(256, 0, 0)
End If
If RTrim(LTrim(UCase(TextBox12.Text))) <> Word(11) Then
TextBox12.ForeColor = RGB(256, 0, 0)
End If
If RTrim(LTrim(UCase(TextBox13.Text))) <> Word(12) Then
TextBox13.ForeColor = RGB(256, 0, 0)
End If
If RTrim(LTrim(UCase(TextBox14.Text))) <> Word(13) Then
TextBox14.ForeColor = RGB(256, 0, 0)
End If
If RTrim(LTrim(UCase(TextBox15.Text))) <> Word(14) Then
TextBox15.ForeColor = RGB(256, 0, 0)
End If
End Sub