PC Review


Reply
Thread Tools Rate Thread

CHANGING FONT SIZE

 
 
=?Utf-8?B?Z3diZGlyZWN0?=
Guest
Posts: n/a
 
      12th Sep 2007
I have a list in excel that needs to be printed within a certain space
variable data.
Is there a way to set up a formula/macro that will change the font size if
there are more than say 60 characters but leave any less than 60 characters
the same size.

 
Reply With Quote
 
 
 
 
JE McGimpsey
Guest
Posts: n/a
 
      12th Sep 2007
Formulas can't change formatting such as font size.

One possibility:

Put this in the ThisWorkbook code module:

Private Sub Workbook_BeforePrint(Cancel As Boolean)
With Worksheets("Sheet1").Range("A1")
If Len(.Text) > 60 Then .Font.Size = 8
End With
End Sub

Change your worksheet and cell to change.

In article <3287B0AB-796A-4815-849A-(E-Mail Removed)>,
gwbdirect <(E-Mail Removed)> wrote:

> I have a list in excel that needs to be printed within a certain space
> variable data.
> Is there a way to set up a formula/macro that will change the font size if
> there are more than say 60 characters but leave any less than 60 characters
> the same size.

 
Reply With Quote
 
=?Utf-8?B?Z3diZGlyZWN0?=
Guest
Posts: n/a
 
      12th Sep 2007
Hi JE,\
I put the code in the THISWORKBOOK MODULE.
hOW DO i MAKE IT RUN. Do I need to set up a button.

"JE McGimpsey" wrote:

> Formulas can't change formatting such as font size.
>
> One possibility:
>
> Put this in the ThisWorkbook code module:
>
> Private Sub Workbook_BeforePrint(Cancel As Boolean)
> With Worksheets("Sheet1").Range("A1")
> If Len(.Text) > 60 Then .Font.Size = 8
> End With
> End Sub
>
> Change your worksheet and cell to change.
>
> In article <3287B0AB-796A-4815-849A-(E-Mail Removed)>,
> gwbdirect <(E-Mail Removed)> wrote:
>
> > I have a list in excel that needs to be printed within a certain space
> > variable data.
> > Is there a way to set up a formula/macro that will change the font size if
> > there are more than say 60 characters but leave any less than 60 characters
> > the same size.

>

 
Reply With Quote
 
Dave Peterson
Guest
Posts: n/a
 
      12th Sep 2007
You don't need to do anything special--except allow macros when you open the
workbook.

The workbook_beforeprint will fire each time you use print or print preview.



gwbdirect wrote:
>
> Hi JE,\
> I put the code in the THISWORKBOOK MODULE.
> hOW DO i MAKE IT RUN. Do I need to set up a button.
>
> "JE McGimpsey" wrote:
>
> > Formulas can't change formatting such as font size.
> >
> > One possibility:
> >
> > Put this in the ThisWorkbook code module:
> >
> > Private Sub Workbook_BeforePrint(Cancel As Boolean)
> > With Worksheets("Sheet1").Range("A1")
> > If Len(.Text) > 60 Then .Font.Size = 8
> > End With
> > End Sub
> >
> > Change your worksheet and cell to change.
> >
> > In article <3287B0AB-796A-4815-849A-(E-Mail Removed)>,
> > gwbdirect <(E-Mail Removed)> wrote:
> >
> > > I have a list in excel that needs to be printed within a certain space
> > > variable data.
> > > Is there a way to set up a formula/macro that will change the font size if
> > > there are more than say 60 characters but leave any less than 60 characters
> > > the same size.

> >


--

Dave Peterson
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
changing default Font and Font Size cap10 Windows Vista Mail 1 3rd Feb 2010 01:04 PM
Font changing - size and font sporadically Damon Longworth Microsoft Outlook Discussion 0 22nd Jan 2010 10:24 PM
Changing Font Size/Display Size Ashlee Microsoft Outlook Discussion 1 2nd Oct 2008 04:04 PM
Changing Font color based on font type or size John Microsoft Excel Misc 2 7th Feb 2008 12:50 AM
Changing row height in a data grid without changing font size =?Utf-8?B?S2FzZXk=?= Microsoft C# .NET 1 30th Jun 2006 12:20 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:32 PM.