User input box with IF statement
Hi
I was wondering if anyone could help/point me in the right direction, I have the following macro
Sub PromptText()
'
' PromptText Macro
'
'
Dim TopLineText As String
TopLineText = InputBox("Top Line Text?", "")
Selection.TypeText Text:=TopLineText
Selection.TypeParagraph
End Sub
Which works fine however I would like it to only add the TypeParagraph if any text is input. If the prompt is left blank I would like it to effectively do nothing (stay on the same line) as I will add additional commands to the macro once this is sorted.
Any advice appreciated.
Cheers
Chris
|