I would like my users to avoid filling in the "save as" box in a vb app. How can I have the vb app pass the file name to the "save as" box and not even display it ???
Where "fPath" is a variable containing the path and "fName" is a variable containing the file name. You can combine these into one variable. This may prompt the user to overwrite an existing file if there is a naming conflict.
Do you mean prevent them doing Save As themselves.
If so use (must be in the Workbook code module)...
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As _
Boolean, Cancel As Boolean)
If SaveAsUI = True Then
MsgBox "I couldn't possibly allow you to do that"
Cancel = True
End If
End Sub
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.