Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default change font size and bold in cell?

When I use

Worksheets("Teacher Info").Range("A1").Value = "Teacher Information

AM Class"

How can I make it so the first line is Font 12 (Bold)
the second line if Font 10
Third line is font 16?

All of this information is in the same cell?


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,337
Default change font size and bold in cell?

Sub setfont()
With ActiveCell
..Font.Size = 12
..font.bold=true
..Offset(1).Font.Size = 10
..Offset(2).Font.Size = 16

End With
End Sub
--
Don Guillett
SalesAid Software

"R Doornbosch" wrote in message
...
When I use

Worksheets("Teacher Info").Range("A1").Value = "Teacher Information

AM Class"

How can I make it so the first line is Font 12 (Bold)
the second line if Font 10
Third line is font 16?

All of this information is in the same cell?




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default change font size and bold in cell?

I can change the font and make it BOLD but the keyword Offset doesn't seem
to do anything.



"Don Guillett" wrote in message
...
Sub setfont()
With ActiveCell
.Font.Size = 12
.font.bold=true
.Offset(1).Font.Size = 10
.Offset(2).Font.Size = 16

End With
End Sub
--
Don Guillett
SalesAid Software

"R Doornbosch" wrote in message
...
When I use

Worksheets("Teacher Info").Range("A1").Value = "Teacher Information

AM Class"

How can I make it so the first line is Font 12 (Bold)
the second line if Font 10
Third line is font 16?

All of this information is in the same cell?






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default change font size and bold in cell?

Cell A1 = the text below, when I use
Offset(1) .font = 20 the text remains at font 12, I'd like the school
name to be font 16 and the teacher name to be font 14 THANKS


A.A. PUBLIC SCHOOL
Chatham-Kent

Teacher Name
3 - Alternating full day, starting Monday




  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default change font size and bold in cell?

Sorry, I did use Font.Size and it still doesn't affect the text. I cut and
past your code perfectly, every other line in your code works except the
Offset command.


  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default change font size and bold in cell?

The code Don gave you does not change font sizes within a cell, rather it
changes fonts in 3 contiguous cells in a column.

Gord Dibben Excel MVP

On Mon, 9 Feb 2004 15:39:32 -0500, "R Doornbosch"
wrote:

Sorry, I did use Font.Size and it still doesn't affect the text. I cut and
past your code perfectly, every other line in your code works except the
Offset command.


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
When I change the font size in a cell the value changes. Value increases with increase in font. Excel Worksheet Functions 5 June 28th 07 11:00 PM
How to change Font size based upon cell input Ashley McKay Excel Discussion (Misc queries) 5 March 23rd 07 06:44 PM
Can you keep a cells BOLD Font, cell color size Trese Excel Discussion (Misc queries) 2 August 23rd 05 03:09 PM
Changing font size, bold and underline ChuckM[_2_] Excel Programming 1 December 17th 03 02:12 PM
Change font to red and bold Derek[_3_] Excel Programming 1 July 10th 03 11:29 AM


All times are GMT +1. The time now is 04:56 AM.

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"