(Solved) – VBA Filling a number up (ex. 1-> 00001)?

  • by

I have a code snippet which tells me in which row a specific value is

With Tabelle1
Set pzrow = .Cells.Find(What:=pznr, LookIn:=xlValues, searchorder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False, searchformat:=False) ' sucht die Nummer der Zeile raus
End With

The value can differ between 1 and 29000.
Just for cosmetic reasons I want to display the row in a Label caption:

pzrow1.Caption = "Eintrag Nr. " & pzrow.Row

and this should show “Eintrag Nr. 00001” for example, not “Eintrag Nr. 1”

Some Ideas?

Leave a Reply

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