title: VBA - Excel VBA Set Horizontal & Vertical alignment
body: <p>I have created a click event that allows me to add a colour to two different cells. However, at the moment, it only sets the colour to the cells vertically. </p>
  
  <p>I am desperately trying to find a option to allow users to select whether they want to add the colours vertically or horizontally. This is how my code looks thus far:</p>
  
  <pre><code>Private Sub Button1_Click()
  
  Dim chemin1 As Object
  Set chemin1 = ThisWorkbook.Worksheets("Sheet1").Range("A1:J10")
  With chemin1
  Dim length As Integer
  Dim ship As String
  Dim message_box As String
  
  length = 1
  
  message_box = "Vertically or Horizontally?"
  
  If message_box = "V" Then
          length = length + 4
          Do While length &gt; 0
          length = length - 1
          ActiveCell.Interior.color = RGB(128, 128, 128)
          ActiveCell.Offset(1, 0).Select
          Loop
          ShipCount = ShipCount + 1
      MsgBox "Your ship has been placed."
  ElseIf message_box = "H" Then
  { Do the same but horizontally }
  End If
  End With
  
  End Sub
  </code></pre>