This simple snippet helps you make the scrollbar on a textbox(MultiLine) stay DOWN. It also teaches
This simple snippet helps you make the scrollbar on a textbox(MultiLine) stay DOWN. It also teaches you how to add a new line, instead of
API Declarations
NOTE! Make a commandbutton(Command1) and a textbox(Text1)
Set these properties on Text1:
-Multiline: True
-Scrollbars: 2(Vertical)
Rate This simple snippet helps you make the scrollbar on a textbox(MultiLine) stay DOWN. It also teaches
(1(1 Vote))
Static Round As Integer
Round = Round + 1
Randomize Timer ' make a random seed, based on the Timer
Dim a As Integer ' make it an Integer to remove decimals
a = 16 * Rnd + 1 ' pick a random # between 1 and 16
NewLine = Chr(13) + Chr(10) ' This creates a new line when typed in a textbox
Text1 = Text1 + NewLine ' add a blank line
Text1 = Text1 & "--ROUND#" & Round & "---" & NewLine ' Type the round number
Text1 = Text1 & "Yndolia casts Fireball, and hit Erwulf, Harald and Fiona for <" & a & "> points of damage." + NewLine
Text1.SetFocus ' set the focus to Text1
SendKeys "^{End}" ' Send the key [CTRL] and [End] to make the typing cursor go down, wich in turn makes the scrollbar stay DOWN.
End sub
This simple snippet helps you make the scrollbar on a textbox(MultiLine) stay DOWN. It also teaches Comments
No comments yet — be the first to post one!
Post a Comment