Adding a Text via Keyboard Input to a Powerpoin Slide

gennylk

New Member
Joined
Nov 27, 2014
Messages
17
Hi There, I am aware of How to Enter Data from Keyboard using a Macro such as
Code:
Sub Test()
Dim Time As Integer
Time = InputBox("Enter the Time")
MsgBox (Time)
End Sub
But I wanted to use this Variable value and print in a Slide
For example say I wanted to Display the time as

"The time is : " & Time

in Slide 5 How can I do this ?
Thanks in advance,
Genny
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
Hi
See if this example is useful:

Code:
Sub Test()                  ' this is a PowerPoint macro
Dim t%
t = InputBox("Enter the Time")


ActivePresentation.Slides(5).Shapes("textbox1").TextFrame.TextRange.Text = _
"The time is " & t


End Sub
 
Upvote 0

Forum statistics

Threads
1,225,692
Messages
6,186,469
Members
453,358
Latest member
Boertjie321

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top