Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default worksheet.copy truncates at 255 characters

Hi, I have tried to use
worksheet.copy after:= etc etc
to copy data from one worksheet to another but when cells contains more than
255 characters it will be truncated. Does anyone has a solution to this?

/Pelle
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default worksheet.copy truncates at 255 characters

One way is to a add a new sheet and use
Cells.copy to copy all cells to the new sheet.

Dim ws As Worksheet
Dim ws2 As Worksheet

Set ws = ActiveSheet
Set ws2 = Worksheets.Add

ws.Cells.Copy ws2.Range("A1")


--
Regards Ron de Bruin
http://www.rondebruin.nl



"Pelle" wrote in message ...
Hi, I have tried to use
worksheet.copy after:= etc etc
to copy data from one worksheet to another but when cells contains more than
255 characters it will be truncated. Does anyone has a solution to this?

/Pelle



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default worksheet.copy truncates at 255 characters

I'd use a combination of what you do and what Ron suggested.

dim wks as worksheet
dim newWks as worksheet

set wks = worksheets("somesheetname")

wks.copy 'to a new workbook?

set newwks = activesheet

'go back and get the values (including the long ones)

wks.cells.copy _
destination:=newwks.range("a1")

======
This way, I get all the page setup, filters, freeze panes, etc that are on the
original worksheet.

Pelle wrote:

Hi, I have tried to use
worksheet.copy after:= etc etc
to copy data from one worksheet to another but when cells contains more than
255 characters it will be truncated. Does anyone has a solution to this?

/Pelle


--

Dave Peterson
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default worksheet.copy truncates at 255 characters

Hi Dave

Better this way
Excel 2007 not have this problem anymore

--
Regards Ron de Bruin
http://www.rondebruin.nl



"Dave Peterson" wrote in message ...
I'd use a combination of what you do and what Ron suggested.

dim wks as worksheet
dim newWks as worksheet

set wks = worksheets("somesheetname")

wks.copy 'to a new workbook?

set newwks = activesheet

'go back and get the values (including the long ones)

wks.cells.copy _
destination:=newwks.range("a1")

======
This way, I get all the page setup, filters, freeze panes, etc that are on the
original worksheet.

Pelle wrote:

Hi, I have tried to use
worksheet.copy after:= etc etc
to copy data from one worksheet to another but when cells contains more than
255 characters it will be truncated. Does anyone has a solution to this?

/Pelle


--

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
Importing CSV into Excel sometimes truncates text at 256 characters [email protected] Excel Programming 1 December 22nd 05 05:05 PM
data truncates when converting .csv to .xls sergio Excel Discussion (Misc queries) 5 November 26th 05 01:32 PM
y-axis lable truncates words, why? WorkOnTheWeb Charts and Charting in Excel 0 April 24th 05 07:04 AM
Define Name Truncates Formula? Jon L Excel Programming 1 October 9th 04 12:21 PM
Cell Truncates to 255 characters in Macro Andrew[_11_] Excel Programming 1 September 3rd 03 09:22 PM


All times are GMT +1. The time now is 02:55 PM.

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"