Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hi All I have problem with copy paste using VBA. I have a worksheet and its filled with some data. There is also a button that creates another worksheet ad copy some range to the new worksheet I am using the following code : Dim objExcel As Excel.Application Set objExcel = CreateObject("Excel.Application") objExcel.Workbooks.Add objExcel.Visible = False Worksheets("AD Request Form").Range("A1:W12").Copy objExcel.Range("A1:W12").PasteSpecial (xlPasteValues) The problem is that in some cells there is a lot of text. After copy paste in the new worksheet all strings are being cut to 255 char Is there some workarround Plz help it is very important to me BR, Krzysztof -- temp_for_oracle ------------------------------------------------------------------------ temp_for_oracle's Profile: http://www.excelforum.com/member.php...o&userid=25912 View this thread: http://www.excelforum.com/showthread...hreadid=392881 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Why are you creating another instance of Excel? Just use the current
instance and the text will not be truncated. -- Jim "temp_for_oracle" <temp_for_oracle.1t8qqj_1123160773.4379@excelfor um-nospam.com wrote in message news:temp_for_oracle.1t8qqj_1123160773.4379@excelf orum-nospam.com... | | Hi All | I have problem with copy paste using VBA. | | I have a worksheet and its filled with some data. There is also a | button that creates another worksheet ad copy some range to the new | worksheet | | I am using the following code : | | Dim objExcel As Excel.Application | Set objExcel = CreateObject("Excel.Application") | objExcel.Workbooks.Add | objExcel.Visible = False | Worksheets("AD Request Form").Range("A1:W12").Copy | objExcel.Range("A1:W12").PasteSpecial (xlPasteValues) | | | The problem is that in some cells there is a lot of text. | After copy paste in the new worksheet all strings are being cut to 255 | char | | Is there some workarround | Plz help it is very important to me | | | BR, | Krzysztof | | | -- | temp_for_oracle | ------------------------------------------------------------------------ | temp_for_oracle's Profile: http://www.excelforum.com/member.php...o&userid=25912 | View this thread: http://www.excelforum.com/showthread...hreadid=392881 | |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Try this... Code: -------------------- Sub testRemove() Worksheets("AD Request Form").Range("A1:W12").Copy Workbooks.Add wsNew.Range("A1").PasteSpecial Cells.Calculate End Sub -------------------- Enjoy Excelling!!! ilyas... -- ilyaskazi ------------------------------------------------------------------------ ilyaskazi's Profile: http://www.excelforum.com/member.php...o&userid=23969 View this thread: http://www.excelforum.com/showthread...hreadid=392881 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
copying an excell spreadsheet | Excel Discussion (Misc queries) | |||
Excell formulas not copying correctly? | Excel Worksheet Functions | |||
comparison string VBA excell | Excel Discussion (Misc queries) | |||
Excell deletes 0 when its the first number in a string | Excel Discussion (Misc queries) | |||
Excell question about formula copying!!! | Excel Worksheet Functions |