LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Efficient paste from web page; also bring Excel to front

I am copying text from a web page, then pasting it into an Excel file. The
below code gets the job done using SENDKEYS and activesheet.paste. However,
depending on the computer I'm using, activesheet.paste does not work ALL the
time (usually the first time it errors out, then subsequent times it's ok).
I am trying to find a better way to paste the data. Paste special doesn't
give me many options (I tried paste as text, but it crashed Excel).
Additionally, if anyone knows of a way to bring Excel to the front again in a
more effective manner than <Alt-Tab through sendkeys, that would be
appreciated as well.

Here is the code:
Sheets("Data").Select
Range("B:E").ClearContents

SendKeys "^(a)", False
SendKeys "^(c)", False
Application.Wait (Now + TimeValue("0:00:01"))
SendKeys "%({TAB})", False

Range("B1").Select
ActiveSheet.Paste
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Overrighting ( bring to front) dpal Excel Discussion (Misc queries) 1 September 24th 09 10:49 PM
Bring to Front Chuck Excel Discussion (Misc queries) 0 November 8th 06 04:50 PM
Bring series to front coa01gsb Charts and Charting in Excel 1 March 21st 06 06:39 PM
How do I bring a trendline in front of an object in Excel? Crappy KTP Assistant Charts and Charting in Excel 2 July 20th 05 08:41 PM
How do i "bring to front" bubbles in excel bubble charts which ar. Ganesh Charts and Charting in Excel 1 March 10th 05 01:47 PM


All times are GMT +1. The time now is 12:04 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"