DCRAPACCESS
asked on
vba xlsm open hidden
Hi Experts
I have a xlsm file with some code inside. I would like to open the xlsm file. Then the code inside the xlsm file is running, and the xlsm file will save and close it self. As it is now i'm opening the file like this:
Application.FollowHyperlin k "C:\UK\PP_BF.xlsm"
But the I get a message box the ask me if i want to open the file. I don't want this box to appear, and if possible the excel file should be open hidden.
Can someone help me with this?
I have a xlsm file with some code inside. I would like to open the xlsm file. Then the code inside the xlsm file is running, and the xlsm file will save and close it self. As it is now i'm opening the file like this:
Application.FollowHyperlin
But the I get a message box the ask me if i want to open the file. I don't want this box to appear, and if possible the excel file should be open hidden.
Can someone help me with this?
Use:
Set xlBook = xlApp.Workbooks.Open( "C:\UK\PP_BF.xlsm",,False)
to open it in read write mode
Set xlBook = xlApp.Workbooks.Open( "C:\UK\PP_BF.xlsm",,False)
to open it in read write mode
ASKER
just to be sure, the code inside the excel file, will it run and be done before the code continues and set the xlBook and xlApp to nothing?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Dim xlBook As Object
Dim xlApp As Object
Set xlApp = CreateObject("Excel.Applic
Set xlBook = xlApp.Workbooks.Open( "C:\UK\PP_BF.xlsm")
xlApp.Visible = true
Set xlApp = Nothing
Set xlBook = Nothing