Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
NrPortbl file not updated by ThisWorkbook.Save
robcom
I am debugging an XLT template which has been integrated with a third party product. The XLT template has the following code to run before saving. This code cancels the invoked save, but saves the Workbook in-code if certain conditions are met (i.e. if contained data has been sucessfully updated to an external database).
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
Application.DisplayAlerts = False
If Not mbnlIsSaving Then
mbnlIsSaving = True
SaveQuote False
Cancel = True
mbnlIsSaving = False
End If
End Sub
The SaveQuote (False) sub runs the following command if the data is sucessfully updated to the external database:
ThisWorkbook.Save
When this line is run, the profile file (.PRF) is updated within NRPORTBL, but the XLS file is not. The files are:
C:\NrPortbl\NETWORKS\DMSADMIN\3110999_2.PRF = NEW DateTimeStamp
C:\NrPortbl\NETWORKS\DMSADMIN\3110999_2.XLS = OLD DateTimeStamp
Copying the .XLS file and opening it confirms that the old data remains in this file.
Is there another method to update a local XLS file in NRPORTBL?
Find more posts tagged with
Comments
robcom
In the end I have had to change the code logic to control if/when the Cancel flag is set to False in order for the file to save or not.