OK. Make sure you've turned on the LIST function. Then change the ADD ANIME code to this:
Option Explicit
Private Sub cmdAdd_Click()
Dim lRow As Long
Dim lPart As Long
Dim ws As Worksheet
Dim ShTop As Long
Set ws = Worksheets("MyAnimeList")
'find first empty row in database
lRow = ws.Cells(Rows.Count, 1) _
.End(xlUp).Offset(1, 0).Row
'check for a part number
If Trim(Me.Title.Value) = "" Then
Me.Title.SetFocus
MsgBox "Please enter an Anime title"
Exit Sub
End If
'copy the data to the database
With ws
.Cells(lRow, 1).Value = Me.Title.Value
.Cells(lRow, 2).Value = Me.TypeE.Value
.Cells(lRow, 3).Value = Me.TotalEpisodes.Value
.Cells(lRow, 4).Value = Me.DLEps.Value
.Cells(lRow, 5).Value = Me.WatchedEpisodes.Value
End With
ActiveSheet.Shapes("Lint omlaag 4").Select
ShTop = Selection.Top + 12.75
ActiveSheet.Shapes("Lint omlaag 4").Top = ShTop
ActiveSheet.Shapes("Plus 5").Select
ShTop = Selection.Top + 12.75
ActiveSheet.Shapes("Plus 5").Top = ShTop
'clear the data
Me.Title.Value = ""
Me.TypeE.Value = ""
Me.TotalEpisodes.Value = ""
Me.DLEps.Value = ""
Me.WatchedEpisodes.Value = ""
Me.Title.SetFocus
Cells(lRow + 3, 1).Select
End Sub
I've colored my additions to make them easy to spot.
Bookmarks