none
Inputbox in PowerPoint with VBA RRS feed

  • Question

  • Does PowerPoint VBA have an inputbox function, as with Excel (i.e. Application.InputBox Function)?

    Friday, September 14, 2012 11:43 PM

Answers

  • Hi,

    Indeed it does.  I just created the following code in PowerPoint 2010.  It works the same as in Excel.

    Sub Test()
      Dim strResult As String
      strResult = InputBox("Please enter some text")
    End Sub

    Have a great weekend.


    Please do not forget to click “Vote as Helpful” if any post helps you and "Mark as Answer”if it solves the issue.

    • Proposed as answer by Tom Lavedas Monday, September 17, 2012 1:53 PM
    • Marked as answer by Looshsmoot Monday, September 17, 2012 3:32 PM
    Saturday, September 15, 2012 3:20 AM

All replies

  • Hi,

    Indeed it does.  I just created the following code in PowerPoint 2010.  It works the same as in Excel.

    Sub Test()
      Dim strResult As String
      strResult = InputBox("Please enter some text")
    End Sub

    Have a great weekend.


    Please do not forget to click “Vote as Helpful” if any post helps you and "Mark as Answer”if it solves the issue.

    • Proposed as answer by Tom Lavedas Monday, September 17, 2012 1:53 PM
    • Marked as answer by Looshsmoot Monday, September 17, 2012 3:32 PM
    Saturday, September 15, 2012 3:20 AM
  • I want to center my InputBox 300 pixels from the left and 500 pixels from the top. Irrespective of the values I enter for the XPos and YPos parameters, the box is displayed at the same place! Can you give me an example code of how to position the Power Point InputBox at the position on the screen that I desire?
    Wednesday, March 18, 2015 6:10 AM
  • Hi Mike, 

    How do you create the text box in a way that when the power point is in full screen mode the user does not have to move the mouse pointer to the box to enter the input. Instead, the box is active and the user has to just enter values directly 


    Regards, Brent Jakson

    Monday, April 24, 2017 7:37 AM
  • Hi Brent,

    I need a bit more information to answer. Normally, when some event occurs an you display an InputBox, the InputBox has focus. That is, the mouse cursor should already be in the text field of the InputBox waiting for your input.

    Can you tell me a little more? To which event did you add code to display the InputBox? What do you mean by full screen mode? Are you actually running the slide show?

    Thanks,

    Mike


    Mike Corkery, MCT, MVP (Office Systems), MCSD (Windows Store Apps), MCSD (Web Apps), MCITP, MCPD, MSF, etc. Please do not forget to click “Vote as Helpful” if any post helps you and "Mark as Answer”if it solves the issue.

    Monday, April 24, 2017 10:56 AM