Discussion Locked

Word 2000 Message Box

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I've created prompts in Word Templates use [prompt] and want to be able to have end users use their Enter key to activate the OK button after filling in the prompt. Does anyone know how to activate the button?

2 replies

by irina medvinskaya

Try this code:

Sub Main()
Dim str As String
str = InputBox("Enter Information Here")
End Sub

By default the OK button is activated, so once you are prompted all you have to do is Enter and that is an equivalent of clicking OK.

This discussion is closed to new replies.