title: Pascal's Triangle in VB 6.0
body: <p>I would like to ask if how to do the Pascal's triangle in a textbox (multiline) on VB 6.0. I don't want it to be printed. When the user types the number 5, it should go like this:</p>
  
  <pre class="lang-none prettyprint-override"><code>1 2 3 4 5 
  
  1 2 3 4
  
  1 2 3 
  
  1 2 
  
  1
  </code></pre>
  
  <p>My objects are 2 textboxes and a command button
  Here's my first code:</p>
  
  <pre class="lang-vb prettyprint-override"><code>Private Sub Command1_Click()
  Dim MAC As Integer
  Dim RIHO As Integer
  
  Text2.Text = ""
  
  MAC = Text1.Text
  RIHO = MAC
  
  For MAC = Text1.Text To 1 Step -1
  For RIHO = MAC To 1 Step -1
      Text2.Text = Text2.Text &amp; "*"
      Next
      Text2.Text = Text2.Text &amp; vbCrLf
  Next
  End Sub
  </code></pre>