Excel sheet copy/paste problems

mingiunate

New Member
Joined
Dec 14, 2005
Messages
4
Hi!

I have a macro, and it is used to export a few worksheets by copy/pasting them into a new workbook..

However, some of the cells in the sheet i am exporting have a lot of text in them, and in the copies, the text is being cut off...


is there anythign i can do short of splitting the cells up?
can i change the format of the cell, or anything?

thanks!
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
huh?
i have no clue what that means...


but this has nothing to do with column width...
its only copying the first 255 characters of the cells in the sheets that get copy/pasted over


thanks!
 
Upvote 0
Private Sub cmdRenewalPackage_Click()
Dim sName As String
Dim OLEit As OLEObject

If MsgBox("Would you like to export the Financial Package?", vbYesNo, "Export?") = vbYes Then
sName = Application.GetSaveAsFilename(filefilter:="Excel Files (*.xls),*.xls", _
Title:="Specify name and location of where to save", InitialFileName:="Financial Package.xls")
If sName = "False" Then
MsgBox "Renewal Package has not been saved.", , "Warning!"
Exit Sub
End If
Sheets(Array("Cover Page", "Table of Contents", "Summary of Cost", "Continuation Rates", _
"Summary of Cost - Billing", "Continuation Rates - Billing", "Policy Assumptions")).Select
Sheets("Cover Page").Activate
Sheets(Array("Cover Page", "Table of Contents", "Summary of Cost", "Continuation Rates", _
"Summary of Cost - Billing", "Continuation Rates - Billing", "Policy Assumptions")).Copy
sName = Replace(sName, ".xls", " - Financial Package.xls", , , vbTextCompare)
For Each OLEit In ActiveWorkbook.ActiveSheet.OLEObjects
If InStr(1, OLEit.progID, "CommandButton") <> 0 Then
OLEit.Delete
End If
Next OLEit

ActiveWorkbook.SaveAs Filename:=sName
ActiveWorkbook.Close
MsgBox "Financial Package has been saved.", , "Saved"
End If
End Sub
 
Upvote 0
OK i'm no expert, so I'm giving this the old college try, but if anyone else has any ideas I'd love to hear them
 
Upvote 0
It copied mine just fine, let me add a few lines of data to see what happens

entering I did a len count and it takes a cell full of 32676 or whatever the number is and changes it to 255?
 
Upvote 0

Forum statistics

Threads
1,213,563
Messages
6,114,332
Members
448,566
Latest member
Nickdozaj

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top