LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
TDW TDW is offline
external usenet poster
 
Posts: 18
Default This'll stump you! Problem with Copy Sheet between Excel versions

I wrote a simple macro (code listed below) to individually copy a subset of
sheets from a workbook to create new workbooks. The orginal workbook has 13
worksheets and the user wants to copy out 8 worksheets to separate workbooks
to distribute to others.

I test it on my machine running Excel 2003 SP1 and everything works fine. I
test it on another machine running Excel 2000 SP3 and everything works fine.
My wife tests it at work running Excel 2000 and everything works fine. A
colleague runs it on his machine and everything works fine. My client,
running Excel 2002 SP3, runs the macro and it fails. She can't even manually
copy a sheet in the workbook I've sent her! She works in any other workbook
and she can manually copy a sheet.

The VBA command I use to copy a worksheet to a new workbook, the line on
which the macro fails, is simply "Sheets(shtName).Copy". The error is
"Path/File access error (Error 75)."

So, I'm thinking there's some issue between versions. I save my workbook in
Excel 2003 using "Microsft Excel 97- Excel 2003 & 5.0/95 Workbook" file type.
Open it on the machine running 2000-SP3 and do a Save As using "Microsoft
Excel Workbook" thinking that it'll now be saved as a 2000 workbook. Send it
to the client and IT WORKS! ... But Wait ... there are changes ...

I make the changes, go through the same silly Save As process listed above,
send it back to the client and ... IT DOESN'T WORK!! What's with that? This
is just plain rude!

If you've read this far, I Thank You for sticking with me. If you have any
suggestions as to what the issue may be or how I might solve the problem I
would be sincerely grateful!

Thanks in advance for any help that may be provided!
tdw


Private Sub CreateWorkbook(shtName As String, flName As String, asAtDt As
String)

Application.StatusBar = "Creating the " + flName + " workbook"
Sheets(shtName).Copy
'the following formatting replaces existing formulae with values so that
the
'user is not continually prompted to update the formulae when they open
'the workbook
ActiveSheet.Range("H1").Value = "'" + asAtDt
Cells.Find(What:="Plus Already Approved This Fiscal Year",
LookIn:=xlFormulas, LookAt:=xlPart, MatchCase:=False).Cells(1, 2).Activate
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues
Cells.Find(What:="Target For This Fiscal Year (High End of Range)",
LookIn:=xlFormulas, LookAt:=xlPart, MatchCase:=False).Cells(1, 2).Activate
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues
ActiveSheet.Range("A1").Activate

With ActiveWorkbook
.KeepChangeHistory = True
.SaveAs Filename:=flName, AccessMode:=xlShared
.Close
End With

End Sub

 
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
Save multiple versions of a document/excel sheet Tonny Excel Discussion (Misc queries) 1 March 29th 09 04:30 PM
This'll be one for the wizards mr tom Excel Worksheet Functions 7 May 2nd 07 02:39 PM
Did I stump everyone? Counter that ignores hidden rows TechMGR Excel Discussion (Misc queries) 2 April 5th 05 08:45 PM
diferrent Excel versions connection problem da20 Excel Programming 0 March 30th 05 04:54 PM
Copy Sheet Problem Jim[_34_] Excel Programming 8 January 2nd 04 11:50 AM


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