Macro Prompt for Input & Choices

Discussion in 'Software' started by PNut32, Mar 19, 2012.

  1. PNut32

    PNut32 Private E-2

    I have been asked by my someone to make a macro in Word 2010 that will "highlight" user defined lines (example: every 4th line) using user defined colors (example: they can pick between 5 color choices but be required to use that one color for the entire document). I have created a very basic macro:

    Sub Highlight()
    Selection.HomeKey Unit:=wdStory
    Do
    Selection.HomeKey Unit:=wdLine
    Selection.EndKey Unit:=wdLine, Extend:=wdExtend
    Selection.Range.HighlightColorIndex = wdYellow
    Selection.MoveDown wdLine, 3
    Loop Until (Selection.End = ActiveDocument.Content.End - 1)
    Selection.HomeKey Unit:=wdStory
    End Sub

    I would like to keep this structure, but somehow allow the "MoveDown wdLine" to be changed by the user in some sort of a prompt box as well as the "HighlightColorIndex" to be changed by the user. And, obviously I don't want them to have to go into VBA to make the changes.

    Apparently they want to use this for some sort of a reading guide for large documents.

    Any help would be appreciated.
     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds