Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Importing CSV into Excel sometimes truncates text at 256 characters | Excel Programming | |||
data truncates when converting .csv to .xls | Excel Discussion (Misc queries) | |||
y-axis lable truncates words, why? | Charts and Charting in Excel | |||
Define Name Truncates Formula? | Excel Programming | |||
Cell Truncates to 255 characters in Macro | Excel Programming |