(Solved) – Showing Current Date and Time on UserForm when Initialize, giving Error


I have the following code:

  Set FindRow = Hoja6.Range("B:B").Find(What:=User, LookIn:=xlValues, LookAT:=xlPart)

  Me.UserLog.Text = "Best Guy."
  Me.RecentUserLog.Value = FindRow.Offset(0, 1).Value
  Me.LastUserLog.Value = FindRow.Offset(1, 1).Value
  End If

If i hide the two last lines, it works fine. But if i keep it like this, its says

object variable or with object not set

I tried Hoja6.Select (sheet6.Select) but still does not work. The purpose is to show the current date and time and the last log. The user variable is public, and it works when i open the userform, but now i changed a bit the filters by user, and having trouble solving this.

Leave a Reply

Your email address will not be published. Required fields are marked *