Hi:
I am trying to alter a code so it names the file the way the user requires it. I can not seem to get it right. I want the code to take the cvalue in C2 of the active sheet and trim the last 10 characters off it. How do i do that? I got it to do it in a cell but unfortunately I can not get it to work in VBA. No error it just does not trim off the 10 characters. Here is the formula:
=LEFT(C2, LEN(C2) - 10)
Here is the line of code I tried to put it in:
Any assistance as ALWAYS is GREATLY Appreciated
THANKS,
Mark
I am trying to alter a code so it names the file the way the user requires it. I can not seem to get it right. I want the code to take the cvalue in C2 of the active sheet and trim the last 10 characters off it. How do i do that? I got it to do it in a cell but unfortunately I can not get it to work in VBA. No error it just does not trim off the 10 characters. Here is the formula:
=LEFT(C2, LEN(C2) - 10)
Here is the line of code I tried to put it in:
Code:
TempFileName = FilePath & Format(ActiveSheet.Range("C1"), "yyyy mm dd") & " " & "MOHLTCK" & " " [COLOR=red][B]& Format(ActiveSheet.Range("C2"), "=Left(C2, Len(C2) - 10)")[/B][/COLOR] & " " & "REV"
Any assistance as ALWAYS is GREATLY Appreciated
THANKS,
Mark