Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default XP activesheet.paste error on VMware servers


Dave the whole code is

'
' Breakup by ClientType
'

Workbooks.OpenText Filename:= _
ReportFiles + "GFST_Volumes_1.txt"

' copy the txt file data
Rows("3:3").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
ActiveWorkbook.Close

'paste it in to the GFST's, Breakup by ClientType worksheet
Windows("GFST.XLS").Activate
Sheets("Breakup by ClientType").Select
Range("A2").Select
ActiveSheet.Paste
Cells.Select
Cells.EntireColumn.AutoFit

As I mentioned previously, the code runs perfectly on XP machines, wit
both Excel XP and Excel 97. When put on a VMWare server it causes th
error.

There are 6 other sheets that uses the same code, that run previous t
the execution of this code for GFST. It's it GFST that crashes.

As you said, perhaps the clipboard contents are getting lost. Is ther
any way I can force Excel to keep the clipboard contents

--
pcor
-----------------------------------------------------------------------
pcora's Profile: http://www.excelforum.com/member.php...fo&userid=1478
View this thread: http://www.excelforum.com/showthread.php?threadid=26410

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default XP activesheet.paste error on VMware servers

Maybe it's the closing of the workbook that's losing the clipboard's content.
You could try delaying that close until later.

One way (untested):

Option Explicit
Sub testme()

Dim textWks As Worksheet
Dim ReportFiles As String
Dim RngToCopy As Range
Dim ToWks As Worksheet

ReportFiles = "c:\myfoldergoeshere\"

Set ToWks = Workbooks("gfst.xls").Worksheets("breakup by clienttype")

Workbooks.OpenText Filename:= ReportFiles & "GFST_Volumes_1.txt"

Set textWks = ActiveSheet
With textWks
Set RngToCopy = .Range("A3", .Range("a3").End(xlDown))
End With

With ToWks
RngToCopy.entirerow.Copy _
Destination:=.Range("a2")
.UsedRange.Columns.AutoFit
End With

Application.CutCopyMode = False
textWks.Parent.Close savechanges:=False

End Sub



pcora wrote:

Dave the whole code is

'
' Breakup by ClientType
'

Workbooks.OpenText Filename:= _
ReportFiles + "GFST_Volumes_1.txt"

' copy the txt file data
Rows("3:3").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
ActiveWorkbook.Close

'paste it in to the GFST's, Breakup by ClientType worksheet
Windows("GFST.XLS").Activate
Sheets("Breakup by ClientType").Select
Range("A2").Select
ActiveSheet.Paste
Cells.Select
Cells.EntireColumn.AutoFit

As I mentioned previously, the code runs perfectly on XP machines, with
both Excel XP and Excel 97. When put on a VMWare server it causes the
error.

There are 6 other sheets that uses the same code, that run previous to
the execution of this code for GFST. It's it GFST that crashes.

As you said, perhaps the clipboard contents are getting lost. Is there
any way I can force Excel to keep the clipboard contents?

--
pcora
------------------------------------------------------------------------
pcora's Profile: http://www.excelforum.com/member.php...o&userid=14787
View this thread: http://www.excelforum.com/showthread...hreadid=264109


--

Dave Peterson

Reply
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
ActiveSheet.Paste (error) Puzzled Excel Worksheet Functions 1 August 2nd 07 06:18 PM
ActiveSheet.Paste - Error help? dk_ Excel Discussion (Misc queries) 4 November 20th 06 12:27 AM
XP activesheet.paste error on VMware servers pcora Excel Programming 1 September 28th 04 11:25 PM
ActiveSheet.Paste error Ron de Bruin Excel Programming 0 July 25th 03 12:39 PM


All times are GMT +1. The time now is 01:56 AM.

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

About Us

"It's about Microsoft Excel"