hi i am new in excel vba please help me i have a user form that have cmd button called cmd pre or cmd new & also code in . but they cannot show data from sheet to all text boxes here is sample code Private Sub cmdclose_Click() Unload Me End Sub Private Sub cmdNext_Click() If ActiveCell.Column = Columns.Count Then MsgBox "There is no next cell" Exit Sub End If ActiveCell.Offset(0, 1).Select End Sub Private Sub cmdpre_Click() If ActiveCell.Column = 1 Then MsgBox "There is no previous cell" Exit Sub End If ActiveCell.Offset(0, -1).Select End Sub
Thank you for the rep
Forum Contributor
Forum Moderator
Forum Guru
Valued Forum Contributor