Script is hanging up on a paste

Photomofo

Active Member
Joined
Aug 20, 2012
Messages
259
I have a simple code that navigates to a URL, copies a page and pastes the page onto a worksheet. The code is designed to cycle through a series of dates. The code is currently executing the first paste but it hangs up on the second paste. Any ideas?


Code:
        'Application.DisplayAlerts = False
        
        ActiveSheet.PasteSpecial Format:="HTML", Link:=False, DisplayAsIcon:= _
        False, NoHTMLFormatting:=True
        
        Application.DisplayAlerts = True
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
I've tried running this program on three different computers now and all three are hanging up on the PasteSpecial step. This is strange. This program used to chew through 50 web pages a minute. It's also strange that when I press the ESC button to kill the program it finally pastes the data and processes it.
 
Upvote 0
I've tried running this program on three different computers now and all three are hanging up on the PasteSpecial step. This is strange. This program used to chew through 50 web pages a minute. It's also strange that when I press the ESC button to kill the program it finally pastes the data and processes it.
So it is quite sure the problem depends on the data you are trying to paste.

For possible help you should disclose the url of the web page and the code you use to import the information

Bye
 
Upvote 0

Forum statistics

Threads
1,223,970
Messages
6,175,703
Members
452,667
Latest member
vanessavalentino83

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