DerElfente
11-28-2019, 09:37 AM
Dear Sirs and Mamdames,
I'm writing a little script for save excel files as PDF file.
The file name should get saved as follows:
worksheet name & "_" & "list" & " " & the first 2 letters from cell D8 & "." & the first 2 letters from cell K8 & ".pdf"
example: June_list Ha.Ne.pdf
but I don't know how to add the first two letters from the cells D8 and K8. How should I do that?
Sorry for my bad English. Here is the important part of my script:
strFile=Replace(Replace (ws.Name, "", ""), ".", "_") _
&"_" _
&"list" _
&"" _
&"the first 2 letters from cell D8" _
&"." _
&"the first 2 letters from cell K8" _
&".pdf"
strFile= ThisWorkbook.Path&"\"& strFile
I'm writing a little script for save excel files as PDF file.
The file name should get saved as follows:
worksheet name & "_" & "list" & " " & the first 2 letters from cell D8 & "." & the first 2 letters from cell K8 & ".pdf"
example: June_list Ha.Ne.pdf
but I don't know how to add the first two letters from the cells D8 and K8. How should I do that?
Sorry for my bad English. Here is the important part of my script:
strFile=Replace(Replace (ws.Name, "", ""), ".", "_") _
&"_" _
&"list" _
&"" _
&"the first 2 letters from cell D8" _
&"." _
&"the first 2 letters from cell K8" _
&".pdf"
strFile= ThisWorkbook.Path&"\"& strFile