Suggest a filename for the save dialog box

 

 

Purpose: suggest a filename for the save dialog box

Insert the following code:

Public Function SetSecureWorkbookFilename(Filename As String) 

Dim XLSPadlock As Object

On Error GoTo Err

Set XLSPadlock = Application.COMAddIns("GXLS.GXLSPLock").Object 

XLSPadlock.SetDefaultSaveFilename(Filename)

SetSecureWorkbookFilename = "OK"Exit FunctionErr:

SetSecureWorkbookFilename = ""

End Function 

 

You can then call the function:

Sub Test_SetFilename()

SetSecureWorkbookFilename ("d:\my documents\ my save.xlsc")

End Sub

 


Copyright © 2023 G.D.G. Software