Hey what I need is simple buy I am not able to perform it
I am using the following Vba code:
I need the window which contain the workbook to be closed totally not only close it at the same window I have made .bat file to open the excel file and I linked it with windows time schedule the idea is that I have the following files:
1- root.xlsm "Vba code gose here"
2- file1.xlsx "User1 will work on it"
3- file2.xlsx "User2 will work on it"
now the root file is a combination between file1 and file2 which is linked with some values from those 2 files depends on user1 and user2 data entry the idea is that file1 has some cells which need to get the value from file2 and the opposite is true and I done that by this idea:
file1 push data to root.xlsmfile2 push data to root.xlsmfile1 get the data from
file2 by getting them from root.xlsmfile2 get the data from file1 by getting them from root.xlsm
so I need the root.xlsm to be up to date and to do so you need to open the file to get the new values and close it and save
so what I need is:
1- perform is to open root.xlsm file after every 1 hour by linking .bat with windows time schedule which I have already done
2- close the workbook "window" after update the values without the need to close all opened excel filesI have done that using
I was able to get new values and everything is find except that if there are opened excel files it force me to close them all.Any Ideas?
Note: Maybe someone will ask me why you don't link file1 with file2 directly the reason behind that is due to permissions concern.
I am using the following Vba code:
Code:
Private Sub Workbook_Open()
Workbooks("close opened.xlsm").Close
End Sub
I need the window which contain the workbook to be closed totally not only close it at the same window I have made .bat file to open the excel file and I linked it with windows time schedule the idea is that I have the following files:
1- root.xlsm "Vba code gose here"
2- file1.xlsx "User1 will work on it"
3- file2.xlsx "User2 will work on it"
now the root file is a combination between file1 and file2 which is linked with some values from those 2 files depends on user1 and user2 data entry the idea is that file1 has some cells which need to get the value from file2 and the opposite is true and I done that by this idea:
file1 push data to root.xlsmfile2 push data to root.xlsmfile1 get the data from
file2 by getting them from root.xlsmfile2 get the data from file1 by getting them from root.xlsm
so I need the root.xlsm to be up to date and to do so you need to open the file to get the new values and close it and save
so what I need is:
1- perform is to open root.xlsm file after every 1 hour by linking .bat with windows time schedule which I have already done
2- close the workbook "window" after update the values without the need to close all opened excel filesI have done that using
Code:
Application.Quit
I was able to get new values and everything is find except that if there are opened excel files it force me to close them all.Any Ideas?
Note: Maybe someone will ask me why you don't link file1 with file2 directly the reason behind that is due to permissions concern.
Last edited: