Hi
I have included part of the macro that operates uptill the first addpicture
requirement - ie green group first choice and choose a number position 1.
Running in the Visual basic window it works fine. Running as a ppt show -
receive the which group to go first choice box and then their first number
choice box, but just seems to hang and 'escape' ends the show as expected.
Sub Concentration20Picture()
'
' Macro created 16/08/2005 by AND
'
' Setting marker for who went first.
' use button to start game.
Dim Gcount As Integer, Ycount As Integer, MyValueG1 As Integer, MyValueY1 As
Integer
Dim MyValueG2 As Integer, MyValueY2 As Integer, GTotal As Integer, GG As
Integer, YTotal As Integer, YY As Integer
' Go to the next slide
' SlideShowWindows(1).View.Next 'currently not set to operate
' Display Selection box for first group to move.
'
FirstGroup:
Dim Message, Title, Default, FirstGroup
Message = "Enter Group to go first - Green or Yellow" ' Set prompt.
Title = "Starting Team:" ' Set title.
' Display message, title, and default value.
FirstGroup = InputBox(Message, Title, , 100, 15000, "DEMO.HLP", 10)
If FirstGroup = "Green" Then GoTo GreenStart
If FirstGroup = "green" Then GoTo GreenStart
If FirstGroup = "G" Then GoTo GreenStart
If FirstGroup = "g" Then GoTo GreenStart
GoTo Yellowstart
' Submacro for first game move by green.
GreenStart:
FY = 0
FG = 1 'Sets marker for who went first, so group who went 2nd has
another turn.
GG = 1 'sets first choice
' Submacro to Display Selection box for entry of chosen number by Green Group.
' Dim Message, Title, Default, MyValue not required.
Message = "Choose your first number." ' Set prompt.
Title = "Green Group Number:" ' Set title.
' Default = "1" ' Set default.
' Display message, title, and default value.
MyValueG1 = InputBox(Message, Title, , 100, 15000, "DEMO.HLP", 10)
If MyValueG1 > 20 Then GoTo Gwrongentry 'Checks if incorrect number selected.
GoTo Green1choiceA
'deals with a wrong entry for green group
Gwrongentry:
' Submacro to Display Selection box for entry of chosen number by Green Group.
' Dim Message, Title, Default, MyValue not required.
Message = "Choose again, you entered a wrong number." ' Set prompt.
Title = "Green Group Number:" ' Set title.
' Default = "1" ' Set default.
' Display message, title, and default value.
MyValueG1 = InputBox(Message, Title, , 100, 15000, "DEMO.HLP", 10)
If MyValueG1 > 20 Then GoTo Gwrongentry 'Checks if incorrect number selected.
GoTo Green1choiceA
'
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
'
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
' Pre yellow choice confirming no match
PreGreen1choice:
' aim to remove unmatched pair from grid
ActiveWindow.Selection.ShapeRange.Delete
If MyValueY1 = 1 Then GoTo YPos1
If MyValueY1 = 2 Then GoTo YPos2
If MyValueY1 = 3 Then GoTo YPos3
If MyValueY1 = 4 Then GoTo YPos4
If MyValueY1 = 5 Then GoTo YPos5
If MyValueY1 = 6 Then GoTo YPos6
If MyValueY1 = 7 Then GoTo YPos7
If MyValueY1 = 8 Then GoTo YPos8
If MyValueY1 = 9 Then GoTo YPos9
If MyValueY1 = 10 Then GoTo YPos10
If MyValueY1 = 11 Then GoTo YPos11
If MyValueY1 = 12 Then GoTo YPos12
If MyValueY1 = 13 Then GoTo YPos13
If MyValueY1 = 14 Then GoTo YPos14
If MyValueY1 = 15 Then GoTo YPos15
If MyValueY1 = 16 Then GoTo YPos16
If MyValueY1 = 17 Then GoTo YPos17
If MyValueY1 = 18 Then GoTo YPos18
If MyValueY1 = 19 Then GoTo YPos19
If MyValueY1 = 20 Then GoTo YPos20
'
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
'
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Green1choice:
GG = 1
If Matchcount = 10 Then GoTo Totals
' Submacro to Display Selection box for entry of chosen number by Green Group.
' Dim Message, Title, Default, MyValue not required.
Message = "Choose your first number." ' Set prompt.
Title = "Green Group Number:" ' Set title.
' Default = "1" ' Set default.
' Display message, title, and default value.
MyValueG1 = InputBox(Message, Title, , 100, 15000, "DEMO.HLP", 10)
If MyValueG1 > 20 Then GoTo Gwrongentry 'Checks if incorrect number selected.
GoTo Green1choiceA
' ______________________________________________________________________
' XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
' Green1 = Greens first choice.
'
Green1choiceA:
' Check for previously chosen pair
' If GPairA = 3 Then GoTo Gwrongentry
' If GPairB = 3 Then GoTo Gwrongentry
' If GPairC = 3 Then GoTo Gwrongentry
' If GPairD = 3 Then GoTo Gwrongentry
' If GPairE = 3 Then GoTo Gwrongentry
' If GPairF = 3 Then GoTo Gwrongentry
' If GPairG = 3 Then GoTo Gwrongentry
' If GPairH = 3 Then GoTo Gwrongentry
' If GPairI = 3 Then GoTo Gwrongentry
' If GPairJ = 3 Then GoTo Gwrongentry
' Setting values.
GG = GG + 1 ' sets count for second choice.
Gcount = MyValueG1
' Decision for which number chosen
If MyValueG1 = 1 Then GoTo G1
If MyValueG1 = 2 Then GoTo G2
If MyValueG1 = 3 Then GoTo G3
If MyValueG1 = 4 Then GoTo G4
If MyValueG1 = 5 Then GoTo G5
If MyValueG1 = 6 Then GoTo G6
If MyValueG1 = 7 Then GoTo G7
If MyValueG1 = 8 Then GoTo G8
If MyValueG1 = 9 Then GoTo G9
If MyValueG1 = 10 Then GoTo G10
If MyValueG1 = 11 Then GoTo G11
If MyValueG1 = 12 Then GoTo G12
If MyValueG1 = 13 Then GoTo G13
If MyValueG1 = 14 Then GoTo G14
If MyValueG1 = 15 Then GoTo G15
If MyValueG1 = 16 Then GoTo G16
If MyValueG1 = 17 Then GoTo G17
If MyValueG1 = 18 Then GoTo G18
If MyValueG1 = 19 Then GoTo G19
If MyValueG1 = 20 Then GoTo G20
If GG = 2 Then GoTo Green2choice
'
________________________________________________________________________________________
'
________________________________________________________________________________________
'
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
' Concentration pictures
' postion 1 on concentration grid
G1:
' Picture routines.
' Sub green1 picture()
ActiveWindow.Selection.SlideRange.Shapes.AddPicture(FileName:="C:\Documents
and Settings\Allan\Desktop\Picture\cb20 1P.cdr", LinkToFile:=msoFalse,
SaveWithDocument:=msoTrue, Left:=306, Top:=216, Width:=108,
Height:=108).Select
With ActiveWindow.Selection.ShapeRange
.IncrementLeft -218.12
.IncrementTop -201.12
End With
If GG = 2 Then GoTo Green2choice
If GG = 1 Then GoTo Gmatch
GoTo Yellow1choice
' Sub green2 pictures()
G2:
ActiveWindow.Selection.SlideRange.Shapes.AddPicture(FileName:="C:\Documents
and Settings\Allan\Desktop\Picture\cb20 2P.cdr", LinkToFile:=msoFalse,
SaveWithDocument:=msoTrue, Left:=306, Top:=216, Width:=108,
Height:=108).Select
With ActiveWindow.Selection.ShapeRange
.IncrementLeft -110.38
.IncrementTop -201.12
End With
' ActiveWindow.Selection.Unselect
If GG = 2 Then GoTo Green2choice
If GG = 1 Then GoTo Gmatch
GoTo Yellow1choice