Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 11-12-2015, 02:32 PM
macropod's Avatar
macropod macropod is offline User input box with IF statement Windows 7 64bit User input box with IF statement Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,340
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Try:
Code:
Sub PromptText()
Dim TopLineText As String
TopLineText = InputBox("Top Line Text?", "")
If Trim(TopLineText) <> "" Then Selection.InsertAfter TopLineText & vbCr
End Sub
PS: When posting code, please use the code tags, indicated by the # button on the posting menu.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Variable arrays from user input SeattleITguy Excel Programming 1 01-29-2015 09:19 AM
Taking input from InputBox from user SeattleITguy Excel Programming 1 01-28-2015 09:05 AM
User input box with IF statement vba: user input named argument andrew12345 Excel Programming 2 11-18-2014 08:18 AM
User input box with IF statement User input to a variable on the document dsm1995gst Word VBA 1 09-03-2013 03:43 PM
Look up an array based on user input johnsmb Excel 2 01-07-2011 01:12 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 08:30 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft