Andyman448
11-14-2008, 12:16 PM
Hi I am working on a Power Point project and I am learning how to program macro to it.
I have created 5 pages in power point on the first page I have placed a button.
When I click the button this code starts:
Dim myArray(4)
Sub YourName()
userName = InputBox(Prompt:="Enter Your Name Here")
myArray(0) = "Page 1"
myArray(1) = "Page 2"
myArray(2) = "Page 3"
myArray(3) = "Page 4"
max = UBound(myArray)
MsgBox myArray(Int((max * Rnd)))
End Sub
Now I want to replace the MsgBox so instead of typing Page "Rnd Nr"
I Want it to move to that page in the power point!!
So if anyone out here can help me I would really appreciate it. :friends:
By the way, Sorry for my english.
Thank you!!!
I have created 5 pages in power point on the first page I have placed a button.
When I click the button this code starts:
Dim myArray(4)
Sub YourName()
userName = InputBox(Prompt:="Enter Your Name Here")
myArray(0) = "Page 1"
myArray(1) = "Page 2"
myArray(2) = "Page 3"
myArray(3) = "Page 4"
max = UBound(myArray)
MsgBox myArray(Int((max * Rnd)))
End Sub
Now I want to replace the MsgBox so instead of typing Page "Rnd Nr"
I Want it to move to that page in the power point!!
So if anyone out here can help me I would really appreciate it. :friends:
By the way, Sorry for my english.
Thank you!!!