Linking two programs to one companion file

Almiex

New member
I recently purchased XLS Padlock and do not know exactly how to do this.

I have two programs both needing to be linked to the same companion file.

The first program (Item Master Data) needs to open the Excel companion file (Preferred Supplier Data) and paste certain information everytime the Item Master Data program is saved. - PLEASE HELP

The second program uses VLOOKUP from the Preffered Supplier Data file. - This should be doable if only I can get the first part to work.
 
The sole possibility is to place the companion file outside the two EXE files, in the same folder as the two EXE files. Then you’ll have to use full path references thanks to the VBA extension here:
image
 
Thank you for the feedback.

I have the following code that needs to run everytime the Item Master Data program is saved (Please help):
Code:
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)

    Application.ScreenUpdating = False

    Dim wbIMD As Workbook, wbPSD As Workbook

    Sheets("C").Activate

    Set wbIMD = ThisWorkbook

'This is where the pathtofile needs to be used
    Set wbPSD = Workbooks.Open(pathtofile("Preffered Supplier Data.xlsx"))

    wbIMD.Activate
        Sheets("Item Info Matrix").Select
            Range(Range("A3"), Range("G" & Rows.Count).End(xlUp)).Copy
        
    wbPSD.Activate
        Range("A1").PasteSpecial xlPasteFormats
        Range("A1").PasteSpecial xlPasteValuesAndNumberFormats
    
        Range("A1").Select
    
        Range(Range("A1"), Range("a1").End(xlToRight)).EntireColumn.AutoFit
    
    wbPSD.Close True

End Sub
 
Last edited:
The code works when it is still in Exel form, but not when I build and open the secure application.

What am I missing?
 
Last edited:
I need help with this as well please…

How can I get the program to save over the originals files of both the application and companion files instead of asking me to name the new save file every time?
 
gdgsupport said:
DId you enable “Do not allow loading/saving other workbooks” option in XLS Padlock?
Please answer to the question, because it can help in solving your issue.
 
Back
Top