-
A part of the program im working on at the moment allows the user to rename files, but when they do this the file type is lost, can anyone tell me how to keep the file type, or even if it will work, how to keep the last 3 letters(filetype) of the old name.
-
Dim OldName, NewName As String
'In OldName you store the old filname, for
'instance "test.txt"
'In Text1 the user inputs the new name, without the last three letters.
NewName = Text1.Text & Rigth(OldName, 4)
If OldName is "Test.txt" and the user writes "Newfile" in Text1 NewName will be "Newfile" & ".txt" = "Newfile.txt"
Hope it helps.
Pentax