So the user has a form which exports to another sheet, I need to put in columns and instead of rows
Code:
Private Sub ClearButton1_Click()
Call UserForm_Initialize
End Sub
Private Sub CloseButton2_Click()
Unload Me
End Sub
Private Sub Export_Click()
Dim emptyRow As Long
'Make Sheet3 active
Sheet3.Activate
'Determine NextRow
NextRow = WorksheetFunction.CountA(Range("A:A")) + 1
'Transfer information
Cells(NextRow, 1).Value = ListBox1.Value
Cells(NextRow, 2).Value = TextBox1.Value
Cells(NextRow, 3).Value = TextBox2.Value
Cells(NextRow, 4).Value = TextBox3.Value
Cells(NextRow, 5).Value = TextBox4.Value
Cells(NextRow, 6).Value = TextBox5.Value
End Sub
Private Sub TextBox2_Change()
End Sub
Private Sub UserForm_Initialize()
'Empty ListBox1
ListBox1.Clear
'Fill ListBox1
With ListBox1
.AddItem "Hayward Heath"
.AddItem "Birch"
.AddItem "Leonard"
.AddItem "Leeds"
.AddItem "Glasgow"
.AddItem "Priory"
.AddItem "Tithebarn"
End With
'EmptyTextBox1
TextBox1.Value = ""
'EmptyTextBox2
TextBox2.Value = ""
With TextBox2
.Text = "dd/mm/yyyy"
.SetFocus
.SelStart = 0
.SelLength = Len(.Text)
End With
'EmptyTextBox3
TextBox3.Value = ""
'EmptyTextBox4
TextBox4.Value = ""
'EmptyTextBox5
TextBox5.Value = ""
'Set Focus on ListBox1
End Sub