L
Luthor
I downloaded the quiz from http://skp.mvps.org/ppt00031.htm. The
disadvantage of this quiz is that all the answers and questions have
to be in the VBA code. I want to use ppt as a kind of template and use
data from excel to import in the sheet (not cut and paste). In this
way I can use more than one (excel) quiz in the same presentation. I
found a way with using a txt file with the following code:
Dim FileNum, tel As Integer
Dim FileName As String
Dim InputBuffer As String
FileName = "C:\test.txt"
FileNum = FreeFile
Open FileName For Input As FileNum
tel = -1
While Not EOF(FileNum)
Input #FileNum, InputBuffer
tel = tel + 1
Qs(tel) = InputBuffer
Input #FileNum, InputBuffer
Choices(tel, 0) = InputBuffer
Input #FileNum, InputBuffer
Choices(tel, 1) = InputBuffer
Input #FileNum, InputBuffer
Choices(tel, 2) = InputBuffer
Input #FileNum, InputBuffer
Ans(tel) = InputBuffer
Wend
Close FileNum.
This works ok but I want to use excel and put a row, cell or column
from excel in powerpoint.
who knows the right VBA code to establish this???
Luthor
disadvantage of this quiz is that all the answers and questions have
to be in the VBA code. I want to use ppt as a kind of template and use
data from excel to import in the sheet (not cut and paste). In this
way I can use more than one (excel) quiz in the same presentation. I
found a way with using a txt file with the following code:
Dim FileNum, tel As Integer
Dim FileName As String
Dim InputBuffer As String
FileName = "C:\test.txt"
FileNum = FreeFile
Open FileName For Input As FileNum
tel = -1
While Not EOF(FileNum)
Input #FileNum, InputBuffer
tel = tel + 1
Qs(tel) = InputBuffer
Input #FileNum, InputBuffer
Choices(tel, 0) = InputBuffer
Input #FileNum, InputBuffer
Choices(tel, 1) = InputBuffer
Input #FileNum, InputBuffer
Choices(tel, 2) = InputBuffer
Input #FileNum, InputBuffer
Ans(tel) = InputBuffer
Wend
Close FileNum.
This works ok but I want to use excel and put a row, cell or column
from excel in powerpoint.
who knows the right VBA code to establish this???
Luthor