Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Cell size format

I need to copy a cell from a sheet set up to input information(Input) to
another sheet that is set up as a letter template(Template) The problem
I am having is, sometimes the cell contains about a paragraph of
information, other times it could only contain a few words.

Is it possible to automatically change the size of the cell on the
Template sheet to match the size of the cell on the Input sheet.

Also, since it will be printed, is it possible to wrap the cell to the
next row when it reaches the set print area(or a designated cell)?

Thanks,
Josh

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 117
Default Cell size format

Declare and set object references to both the cell on the Input worksheet
and the Template worksheet, then try the following code:

With rngTemplateCell
.Value = rngInputCell.Value 'Copy the value to the new cell.
.WrapText = rngInputCell.WrapText
.ColumnWidth = rngInputCell.ColumnWidth

'If the cell formats (font sizes) are the same, use this:
.RowHeight = rngInputCell.RowHeight
'Otherwise, use the following to autofit the row height.
.EntireRow.AutoFit
End With
--
Regards,
Bill


"Josh" wrote in message
...
I need to copy a cell from a sheet set up to input information(Input) to
another sheet that is set up as a letter template(Template) The problem
I am having is, sometimes the cell contains about a paragraph of
information, other times it could only contain a few words.

Is it possible to automatically change the size of the cell on the
Template sheet to match the size of the cell on the Input sheet.

Also, since it will be printed, is it possible to wrap the cell to the
next row when it reaches the set print area(or a designated cell)?

Thanks,
Josh

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



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 worksheet1 to worksheet2, keep cell format eg cell size slocookie Excel Discussion (Misc queries) 2 January 8th 10 11:24 AM
Cell Format - Field Size Access Front End Excel Discussion (Misc queries) 2 August 6th 07 03:02 PM
conditional format: affected by cell size Hugh Murfitt Excel Discussion (Misc queries) 5 November 30th 05 05:04 PM
Format cell window size KHall1968 Excel Worksheet Functions 2 October 13th 05 11:23 AM
How to sent for cell: font size=7,text format in VBA netx Excel Discussion (Misc queries) 1 August 8th 05 06:50 PM


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