vinicsurveying
New member
I’ve been struggling with this for a long time and wondered if anyone else has come up with a solution? Basically I am trying to save a new file using VBA but want it to be saved in the same file as the original exe file. In a standard Excel file the following code works: -
Dim Fnme As String
With ThisWorkbook
Fnme = Left(.FullName, InStr(.FullName, “.”) - 1) & _
"_" & Format(Now, “dd mmm yyyy_hh_mm_ss”) & " SUBMISSION" & ".xlsx"
End With
At one stage I think the following worked in an XLSPadlock protected file but it no longer does: -
With ThisWorkbook
Dim Fnme as String
Set XLSPadlock = Application.COMAddIns(“GXLSForm.GXLSFormula”).Object
PathToFile = XLSPadlock.PLEvalVar(“EXEPath”) & Filename
Fnme = Left(.PathToFile, InStr(.PathToFile, “.”) - 1) & _
"_" & Format(Now, “dd mmm yyyy_hh_mm_ss”) & " SUBMISSION" & ".xlsx"
End With
Has anyone managed to get something similar to work? Any help would be much appreciated.
Dim Fnme As String
With ThisWorkbook
Fnme = Left(.FullName, InStr(.FullName, “.”) - 1) & _
"_" & Format(Now, “dd mmm yyyy_hh_mm_ss”) & " SUBMISSION" & ".xlsx"
End With
At one stage I think the following worked in an XLSPadlock protected file but it no longer does: -
With ThisWorkbook
Dim Fnme as String
Set XLSPadlock = Application.COMAddIns(“GXLSForm.GXLSFormula”).Object
PathToFile = XLSPadlock.PLEvalVar(“EXEPath”) & Filename
Fnme = Left(.PathToFile, InStr(.PathToFile, “.”) - 1) & _
"_" & Format(Now, “dd mmm yyyy_hh_mm_ss”) & " SUBMISSION" & ".xlsx"
End With
Has anyone managed to get something similar to work? Any help would be much appreciated.