title: Creating a sequential number series using a userform for a database
body: <p>I have userform that I created in order to feed a droplist/combobox that will contain IP addresses.  This excel database is being used to deploy computers and equipment throughout new facilities as they open  As you can see in the userform I have two options...One radio Button that allows you to input one IP address while the other one allows you to enter a starting IP address and an ending IP address to create a range.  The input boxes only appear when the corresponding option is TRUE.  The single IP input box writes perfectly into the correct column, but when I click the radio button to add a range, enter the starting and ending of the range and click SUBMIT nothing gets entered.  The cursor just goes down one cell from the first blank cell in the column.<br>
  <a href="https://i.stack.imgur.com/Nn0NB.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Nn0NB.jpg" alt="enter image description here"></a>
  <a href="https://i.stack.imgur.com/gpb4Y.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/gpb4Y.jpg" alt="enter image description here"></a>
  <a href="https://i.stack.imgur.com/LOBm5.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/LOBm5.jpg" alt="enter image description here"></a></p>
  
  <p>Here is the code</p>
  
  <pre><code>Private Sub Submit_Data_Click()
  
  Dim sh As Worksheet
  Set sh = ThisWorkbook.Sheets("Arrays")
  Dim N As Long
  Dim lastRow As Long
  Dim X, Y, A, B
  
  N = sh.Range("I" &amp; Application.Rows.Count).End(xlUp).Row
  
  If Me.Add_single_IP.Value = True Then
      sh.Range("I" &amp; N + 1).Value = Me.sgle_IP_add_tb1
      Else
  If Me.Add_IP_Rng.Value = True Then
  
      A = Me.rge_IP_start_tb2.Value
      B = Me.Rge_IP_End_tb2.Value
  
      For N = I2 To I
  
      ActiveCell.Value = X
      ActiveCell.Offset(X + 1, Y).Select
      Next N
      X = 0
      Y = 0
      End If
      End If
  
  End Sub
  </code></pre>
  
  <p>I am adding a CLEAR command at the end of the code after the data is submitted and also a MsgBox to indicate that the data has been added.</p>
  
  <p>Any help is apreciated.</p>