Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default Long Text in merged cells not copying correctly with sheet

After you copy the worksheet, you could copy the cells in the original worksheet
and paste them right over the new worksheet.

shtmetric.copy _
befo=wkbkmetricdata.worksheets(1)

shtmetric.cells.copy _
destination:=wkbkmetricdata.worksheets(1).range("a 1")




Paul Willman wrote:

I have a vb6 app that copies a sheet in a workbook into another workbook
The VB code is:

shtMetric.Copy wkbMetricData.Worksheets(1)

where shtMetric is defined as an Excel.Worksheet object and wkbMetricData is
defined as an Excel.Workbooks object.

Cells the block of cells from A1 to J4 are merged into one cell, giving me a
large space to display a lot of text. However, when I copy this sheet into
another workbook, the text in that merged cell is trunctated to 255
characters, forcing me to manually copy the data in the cell with a second
line of code:

wkbMetricData.Worksheets(1).Range("A1").Value =
shtMetric.Range("A1").Value

This is sloppy and there must be something going on that I can address to
make sure this cell copies correctly, along with the rest of the sheet.

Thanks for any ideas you may have,

Paul Willman


--

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
copying text on sheet 1 to corresponding cells on sheets 2 to 5 Lisa New Users to Excel 5 October 1st 08 06:01 AM
Copying merged cells Marc Excel Discussion (Misc queries) 2 July 9th 07 09:40 PM
Copying Columns of Text - WS Functions do not work correctly Dixfield Guy Excel Worksheet Functions 2 April 26th 07 02:46 AM
Copying merged cells Tom Ogilvy Excel Programming 0 July 23rd 04 10:43 PM
Copying merged cells? RPIJG[_69_] Excel Programming 1 July 23rd 04 09:40 PM


All times are GMT +1. The time now is 05:21 PM.

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"