I am using a jeopardy game in Powerpoint. I want to enter the questions & answers in excel cells and run a macro to put the cells contents into text boxes in powerpoint slides. Possible?
Printable View
I am using a jeopardy game in Powerpoint. I want to enter the questions & answers in excel cells and run a macro to put the cells contents into text boxes in powerpoint slides. Possible?
Totally:) But why excel/powerpoint combination (why not just use one or the other)?
I see it faster entering all questions and answers for the game in on place. So far, I have suggestions to turn the excel into a csv file w/ comma delimitation and using the SPLIT command to get an array. I've done that here:
Now, I need to get this into slides in the Jeopardy Game PPPCode:Sub ReadAsciiFile()
Dim sFileName As String
Dim iFileNum As Integer
Dim sBuf As String
Dim strB() As String
' edit this:
sFileName = "C:\Users\srainbol\Desktop\test.txt"
' does the file exist? simpleminded test:
If Len(Dir$(sFileName)) = 0 Then
Exit Sub
End If
iFileNum = FreeFile()
Open sFileName For Input As iFileNum
Do While Not EOF(iFileNum)
Line Input #iFileNum, sBuf
strB() = Split(sBuf, ",")
' now you have the next line of the file in sBuf
' do something useful:
Debug.Print sBuf
Loop
' close the file
Close iFileNum
End Sub
If eg your first line in the text file was the question,the answer,the scoreQuote:
Originally Posted by srainbol
Then
strB(0) would be "the question"
strB(1) = "the answer"
strB(2) ="the score"
use these values to populate the textboxes in your game slide 1 and then go on to line two for slide 2
What I was driving at was why use power point as your front end, why not do the whole thing in Excel? To build it in powerpoint you are going to have to build a harness just to hook into the events before you can even start to code the test.
for John
I do not know how to
"use these values to populate the textboxes in your game slide 1 and then go on to line two for slide 2."
Please give me an idea to work on.