Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 94
Default Format Copy to Worksheet

Hi All,

I have a routine I'm using that takes data from a current workbook worksheet
and saves it to a new single worksheet at a noted location.

Here's my problem. I have a cell where I have the user enter text and
sometimes it's over the amount that Excel allows copied to an unformatted
worksheet (tries to truncate after a certain amount of words). I've avoided
this on other documents by coping to a workbook sheet thats aleady
preformatted "General", but I'm looking for a work around when copying to a
new unformatted single worksheet.

Is there a way add a piece of code to the below to call attention to that
particular cell range and change the format to €śGeneral€ť so the text doesnt
truncate? The cell that has the text will be F10 in each doument.

Thanks in advance - Jenny B.

Sub Finalstop()
Dim myPath As String
Dim nRng As Range
Dim fName As String
Set nRng = Range("F64")

ActiveSheet.Copy

Call DeleteAllCode
Call UseBreakLink
ActiveSheet.Shapes("Send").Visible = False
myPath = "I:\DM\PM\Operations\B55 Docs\Checklist\"
fName = nRng.Value & ".xls"
ActiveWorkbook.SaveAs filename:= _
myPath & fName, FileFormat:= _
xlNormal, Password:="", _
WriteResPassword:="", _
ReadOnlyRecommended:=False, _
CreateBackup:=False
ActiveWorkbook.Close
Call TransfertoLog
Call CLEAR
ActiveSheet.Visible = False

End Sub
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Format Copy to Worksheet

It's not the formatting that causes excel to truncate the long text. That's
just the way excel works.

Copy the sheet and go back and copy|paste the cells into the new sheet.

In code:

Dim ActSheet as worksheet
dim NewSheet as worksheet

set actsheet = activesheet

actsheet.copy 'to a new workbook with long strings truncated.

set newsheet = activesheet

actsheet.cells.copy _
destination:=newsheet.range("A1")

newsheet.parent.saveas filename:=....




Jenny B. wrote:

Hi All,

I have a routine I'm using that takes data from a current workbook worksheet
and saves it to a new single worksheet at a noted location.

Here's my problem. I have a cell where I have the user enter text and
sometimes it's over the amount that Excel allows copied to an unformatted
worksheet (tries to truncate after a certain amount of words). I've avoided
this on other documents by coping to a workbook sheet thats aleady
preformatted "General", but I'm looking for a work around when copying to a
new unformatted single worksheet.

Is there a way add a piece of code to the below to call attention to that
particular cell range and change the format to €śGeneral€ť so the text doesnt
truncate? The cell that has the text will be F10 in each doument.

Thanks in advance - Jenny B.

Sub Finalstop()
Dim myPath As String
Dim nRng As Range
Dim fName As String
Set nRng = Range("F64")

ActiveSheet.Copy

Call DeleteAllCode
Call UseBreakLink
ActiveSheet.Shapes("Send").Visible = False
myPath = "I:\DM\PM\Operations\B55 Docs\Checklist\"
fName = nRng.Value & ".xls"
ActiveWorkbook.SaveAs filename:= _
myPath & fName, FileFormat:= _
xlNormal, Password:="", _
WriteResPassword:="", _
ReadOnlyRecommended:=False, _
CreateBackup:=False
ActiveWorkbook.Close
Call TransfertoLog
Call CLEAR
ActiveSheet.Visible = False

End Sub


--

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
Copy format of cell from other worksheet sirjibby Excel Discussion (Misc queries) 4 August 30th 08 01:11 AM
anyway to copy the chart format to another worksheet question on links where info is added an[_2_] Excel Discussion (Misc queries) 3 October 18th 07 01:39 AM
How do I set up formula to copy format from one worksheet to anoth Sky New Users to Excel 1 November 21st 06 02:20 PM
How to copy the format of one worksheet to others in same book? JLW Excel Discussion (Misc queries) 4 July 27th 06 06:56 PM
how do i copy the format of a cell from one worksheet to another Edith F Excel Discussion (Misc queries) 5 June 16th 05 09:17 PM


All times are GMT +1. The time now is 10:34 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"