Microsoft VBA editor opens automatically when I unlock my pc

xkid

New Member
Joined
Jul 16, 2021
Messages
1
Office Version
  1. 365
Platform
  1. Windows
Hello everyone.

Some days ago I noticed that every time I unlock my pc the VBA editor window will automatically open, and somehow this affects a macro that's executed every morning day by the windows task scheduler (I think the macro is affected because since this issue came out the code does not extract all the data that it should) , also I noticed that even when I disable the scheduling task the VBA editor keeps opening automatically.

I tried the workaround mentioned on the post down below, and at first it worked but after a while the VBA editor opened automatically again:


Just in case, I share below the code in the .vbs file that CMD runs by windows task scheduler to execute my macro:

VBA Code:
Dim args, objExcel
Set args = WScript.Arguments
Set objExcel = CreateObject("Excel.Application")
objExcel.Workbooks.Open args(0)
objExcel.Visible = True
objExcel.Run "Ruteo"
objExcel.ActiveWorkbook.Save
objExcel.ActiveWorkbook.Close(0)
objExcel.Quit

Could you help me to fix it, guys?

Best Regards.
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.

Forum statistics

Threads
1,224,823
Messages
6,181,175
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top