Hello.
I have a code that have to fill a textbox with the value of last non empty cell from column F in active sheet.
This code doesn't work, the textbox in frmInregistrare remain empty.
The cause is because cells from column F isn't really empty, all cells have formulas.
I think I know which is the wrong line but I don't know how it have to be modified.
Could you help me, please?
I've attached an example.
Thanks.
The code that I have is follow:
![]()
Private Sub UserForm_Initialize() Dim ws As Worksheet Dim lstRw As Long Set ws = ActiveSheet With ws lstRw = .Rows.Count Me.txtDocNumber = .Range("F" & lstRw).End(xlUp).Value ' This I think is the wrong line End With End Sub
Bookmarks