![]() |
Application Security Loses Control
Hi All
I'm trying to open a workbook without running the workbook events. I have created a SetSecurity modification to 3 (ForceDisable). This then opens the workbook without executing the workbook_open events The problem that I'am having now is that when I pass the workbooks.open(""), it looses control of the workbook & doesn't continue with the rest of the script I have tried setting a Workbook variable during the open, without luck. Opens the file fine, but I need it to contiue with the code I have even tried Application.EnableEvents = False, then opening the wb without the change to the security setting Any help on this one would be great Paul |
Application Security Loses Control
Hi Paul,
Did you assign the workbook to be open to a variable ? Like : Set wb = Workbooks.Open(strWorkbookToOpen) Reeards, JY "Paul Mac." wrote in message ... Hi All, I'm trying to open a workbook without running the workbook events. I have created a SetSecurity modification to 3 (ForceDisable). This then opens the workbook without executing the workbook_open events. The problem that I'am having now is that when I pass the workbooks.open(""), it looses control of the workbook & doesn't continue with the rest of the script. I have tried setting a Workbook variable during the open, without luck. Opens the file fine, but I need it to contiue with the code. I have even tried Application.EnableEvents = False, then opening the wb without the change to the security setting. Any help on this one would be great. Paul |
Application Security Loses Control
Hi Paul,
I didn't had problem with macro security before. I suggest you step(F8) trought your code with the locals window open and check the value of your variables and see if one woudl be changeg by something (...?). For info, what is you current degree of security ? Good luck Regards, JY "Paul Mac" wrote in message ... Hi Jean, I have tried: - Setting the wb Variable as you described - Using the Open FileDIalog.show (then . execute) - Just trying workbook.open all by its lonesome. All with no luck. It appears that as soon as the workbook is called, it stops the current code. I have constructed a workaround by using the Application.Ontime method and calling a sub-set of the code after the point where it stops. Any other ideas would be great. Paul. |
All times are GMT +1. The time now is 02:02 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com