Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Excel Formatting Cells Using VB code

Am fairly new to excel programming,

I am passing in a HTML file to Excel using Style guidelines.

<style
<!--table
@page
{mso-header-data:"&CMultiplication Table\000ADate\: &D\000APage &P";
mso-page-orientation:landscape;}
br
{mso-data-placement:same-cell; mso-word-wrap:true;}
--
</style

Does anyone know the syntax or even if it possible to globally set the cells
so that the format is

FormatCells.Alignment.TextAlignment.vertical = top
FormatCells.Alignment.TextControl.wordwrap = true

set in the HTML style tags as above.

Thanks in advance

Andrew




  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 94
Default Excel Formatting Cells Using VB code

I just recorded a macro and go the following:
Cells.Select
With Selection
.HorizontalAlignment = xlGeneral
.VerticalAlignment = xlTop
.WrapText = True
.Orientation = 0
.ShrinkToFit = False
.MergeCells = False
End With
If that's what your asking, hope this helps since I'm not sure about the
HTML part...

"Andrew Price" wrote in message
...
Am fairly new to excel programming,

I am passing in a HTML file to Excel using Style guidelines.

<style
<!--table
@page
{mso-header-data:"&CMultiplication Table\000ADate\: &D\000APage &P";
mso-page-orientation:landscape;}
br
{mso-data-placement:same-cell; mso-word-wrap:true;}
--
</style

Does anyone know the syntax or even if it possible to globally set the

cells
so that the format is

FormatCells.Alignment.TextAlignment.vertical = top
FormatCells.Alignment.TextControl.wordwrap = true

set in the HTML style tags as above.

Thanks in advance

Andrew






  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Excel Formatting Cells Using VB code

Thanks tim,

Good start and cool having the correct syntax, does anyone know if this
routine can be run from the <head section to format the cells, have tried
playing, adding to the HEAD tag and after the body tag to no avail ?

can anyone help?

Andrew


"Tim Coddington" wrote in message
...
I just recorded a macro and go the following:
Cells.Select
With Selection
.HorizontalAlignment = xlGeneral
.VerticalAlignment = xlTop
.WrapText = True
.Orientation = 0
.ShrinkToFit = False
.MergeCells = False
End With
If that's what your asking, hope this helps since I'm not sure about the
HTML part...

"Andrew Price" wrote in message
...
Am fairly new to excel programming,

I am passing in a HTML file to Excel using Style guidelines.

<style
<!--table
@page
{mso-header-data:"&CMultiplication Table\000ADate\: &D\000APage

&P";
mso-page-orientation:landscape;}
br
{mso-data-placement:same-cell; mso-word-wrap:true;}
--
</style

Does anyone know the syntax or even if it possible to globally set the

cells
so that the format is

FormatCells.Alignment.TextAlignment.vertical = top
FormatCells.Alignment.TextControl.wordwrap = true

set in the HTML style tags as above.

Thanks in advance

Andrew








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
How do I color code comments in cells on Excel spreadsheet? LBH Excel Worksheet Functions 1 September 27th 09 05:04 PM
Formatting Code for SI Units in Excel cjbarnwell Excel Worksheet Functions 3 January 26th 08 10:14 AM
Excel formatting-cells Stacy Taylor Excel Programming 1 March 1st 04 10:17 PM
Excel 2002 - VBA code to insert copied cells?? rglasunow Excel Programming 3 December 24th 03 07:52 PM
Formatting a cell in Excel, using pure VB code Jean Claude Excel Programming 4 October 2nd 03 05:41 PM


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