Protected View

JerryH09

New Member
Joined
Jan 25, 2011
Messages
33
Dear All,
I occasionally get data files scraped from the web. They come in protected view and it is easy to manually enable editing so I can use the data. I would like to use those few manual keystrokes in a macro. The recorded code is:
ActiveWindow.ActivateNext
Application.ActiveProtectedViewWindow.Edit = False
ActiveWindow.ActivateNext


The ActivateNext lines are because the macro is where I want to use the data not the data files themselves but when I run it I get runtime error 91 object variable not set. I can dim Application but I've got no idea how to set it. On error resume next just ignores the application line. Any help would be much appreciated.
Regards,
JerryH09
 
I'm glad you found a resolution and no apologies are necessary.
There are so many ways of executing Excel and permutations of environments that it is often hard to describe a problem and even harder to offer potential solutions that match what was intended to be asked. The RUM intrinsic (Read user's mind) rarely works.
Welcome to the community of those willing to help.
 
Upvote 0

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.

Forum statistics

Threads
1,224,823
Messages
6,181,182
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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