LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
dk_ dk_ is offline
external usenet poster
 
Posts: 70
Default ActiveSheet.Paste - Error help?

This short macro below, gets stopped with an error in the last line
which reads 'ActiveSheet.Paste', if the referenced workbook,
(test1.xls), is already open when the macro is run.

This macro runs without errors on both the Windows Excel97 and the Mac
Excel98 platforms when the referenced workbook 'test1.xls", is not open
at the time that this macro is run.

(This is the beginning of a longer macro.)

How can this procedure be fixed to make it so the macro can run even if
the "test1.xls" workbook is already open?

This macro is started while viewing an active workbook with downloaded
quotes.


.....Macro starts below here....

Sub TEST_Quote_Copier()
Application.ScreenUpdating = False
Range("A1:I120").Copy

mydir = ActiveWorkbook.Path
Workbooks.Open FileName:=mydir & Application.PathSeparator &
"test1.xls"

Sheets("xyzQuotes").Activate
Range("A10").Select
ActiveSheet.Paste
End Sub


.... am enjoying the learning curve.

Thanks for all the help.

-Dennis
 
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
conditional drop down list scott Excel Discussion (Misc queries) 3 June 3rd 06 06:58 AM
New to Macros Richard D Excel Discussion (Misc queries) 3 October 13th 05 07:23 PM
There has to be any easier way!! mully New Users to Excel 18 August 13th 05 12:26 PM
Macros in excel 2000 traineeross Excel Discussion (Misc queries) 12 August 12th 05 03:01 PM
update row numbers after different active cells in macros followi. LMIV Excel Discussion (Misc queries) 11 February 16th 05 12:44 AM


All times are GMT +1. The time now is 03:12 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"