PDA

View Full Version : Solved: Label display



av8tordude
03-27-2011, 07:10 PM
I have userform label named VerNo. how can i display the caption, "Version 5.4.2" in a textbox as 5.4.2 using the code below? The code below will display in a textbox as C:\MyFile Version 5.4.2

I want the textbox to display C:\MyFile v5.4.2 using the same label (VerNo)

txtFile = strFolderName & "\" & "MyFile " & VerNo.Caption & ".xls"

Simon Lloyd
03-27-2011, 08:28 PM
Whats wrong with what you're using?, this works for meMe.TextBox1.Value = ThisWorkbook.Path & " - " & VerNo.Caption & ".xls"

av8tordude
03-27-2011, 08:43 PM
I have a separate code that displays the label caption as Version 5.4.2 (which is fine).

What I'm trying to do now is use the label caption information and display it in the texbox as C:\MyFile v5.4.2 (leaving off Version)

Simon Lloyd
03-27-2011, 09:02 PM
then use this..........& Right(VerNo.Caption, 5) & ".xls"

av8tordude
03-27-2011, 09:19 PM
Perfect!!! Thank you Simon:beerchug: