JamieDuncan
Board Regular
- Joined
- Aug 23, 2006
- Messages
- 132
Basically im trying to create a userform that adds data to the last row of a sheet, an address book that will be eventually linked with access.
Can anyone tell userforms arent my strong point
Can anyone tell userforms arent my strong point
Code:
Private Sub Cancel_Click()
Unload AddressInput
End Sub
Private Sub OK_Click()
Dim ADDB As Worksheet
Set ADDB = Sheets("Address Book")
Dim CompanyName As TextBox
Dim Line1 As TextBox
Dim Line2 As TextBox
Dim Line3 As TextBox
Dim VAT As TextBox
lasta = ADDB.Range("A65000").End(xlUp).Row + 1
lastb = ADDB.Range("B65000").End(xlUp).Row + 1
lastc = ADDB.Range("C65000").End(xlUp).Row + 1
lastd = ADDB.Range("D65000").End(xlUp).Row + 1
laste = ADDB.Range("E65000").End(xlUp).Row + 1
lasta = CompanyName.Value
lastb = Line1.Value
lastc = Line2.Value
lastd = Line3.Value
laste = VAT.Value
Unload AddressInput
End Sub