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: 4
Default Problems Pasting in Macro

I just took over a job duty from one of my co-workers. On the spreadsheet he
uses there is a macro that copies an area of data, then opens an existing
workbook, then pastes the data just copied. This macro works fine on his
computer but not on mine. When I run the macro the area of data copies, but
after it opens the existing workbook the data is no longer in copy mode so it
can not paste the data in the new workbook and I get an error message. Is
there some kind of option that my excel does not have selected that makes the
data stay in copy mode after a new file is opened? I would greatly appreciate
any help anybody may have for me. The following is part of the macro where
the error message comes up as it does not make it past the paste part. I
could rewrite this part of the macro, but this exact problem happens like 30
times in the existing macro and I don't really want to try and change every
single one. Thanks.

Sub TestForAllFiles()
Application.ScreenUpdating = False
Master = ActiveWorkbook.Name
CompCount = Sheets(1).Range("B4")
CurYrEnd = Sheets(1).Range("E5")
PrYrEnd = Sheets(1).Range("E6")
CrWkTot = Sheets(1).Range("E7")
PrWKTot = Sheets(1).Range("E8")
Month = Sheets(1).Range("E4")
Sheets("ConBAL").Select
Cells.Select
Selection.Copy
Workbooks.Open ThisWorkbook.Path & "\HorseHair.xls"
Sheets(1).Select
Range("A1").Select
ActiveSheet.Paste
Application.DisplayAlerts = False
ActiveWorkbook.SaveAs ThisWorkbook.Path & "\Cons Balance Sheet.xls"
Application.DisplayAlerts = True
Sheets(1).Range("A3") = CurYrEnd & " With Comparitive Totals For " & PrYrEnd
BalBook = ActiveWorkbook.Name
Windows(Master).Activate


 
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
pasting problems ll Excel Programming 3 May 4th 07 04:16 PM
Problems with copying and pasting dates from one worksheet to anot hroberto Excel Discussion (Misc queries) 1 March 6th 07 02:49 AM
Pasting problems mikeymike02135 Excel Discussion (Misc queries) 0 April 6th 06 08:53 PM
Pasting problems cvach Excel Programming 1 February 21st 06 01:52 AM
Problems pasting images into Excel Wazooli Excel Discussion (Misc queries) 2 December 7th 04 11:33 PM


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