Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27
Default Default formatting settings

My application adds new worksheets to an open workbook to perform separate
calculations. These worksheets are formatted programmatically, containing
e.g. comboboxes. To ensure correct layout the standard font should be Arial,
size=11. I want to make sure that all users have this setting as default when
they work with this application. I tried this, but without success though:

With Application
.StandardFont = "Arial"
.StandardFontSize = "11"
End With

I put this code on the OK button on a form that adds a new sheet.
--
Stef
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Default formatting settings


Directly after you add the new sheet in your code, you could just use:

Cells.Font.Name = "Ariel"
Cells.Font.Size = 11

to format the sheet.



--
kkkni
-----------------------------------------------------------------------
kkknie's Profile: http://www.excelforum.com/member.php...nfo&userid=754
View this thread: http://www.excelforum.com/showthread.php?threadid=26683

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,253
Default Default formatting settings

your solution just sets it for each new workbook created
after your apply the settings.

For existing workbooks following would probably work ok.

Sub ResetFont()
With ActiveWorkbook
Dim ws
With .Styles("Normal").Font
.Name = "Arial"
.Size = 11
End With
For Each ws In .Worksheets
ws.UsedRange.Font.Name = "Arial"
'leave sizes intact..
Next
End With

End Sub


keepITcool

< email : keepitcool chello nl (with @ and .)
< homepage: http://members.chello.nl/keepitcool


"?B?U3RlZg==?=" wrote:

My application adds new worksheets to an open workbook to perform
separate calculations. These worksheets are formatted
programmatically, containing e.g. comboboxes. To ensure correct layout
the standard font should be Arial, size=11. I want to make sure that
all users have this setting as default when they work with this
application. I tried this, but without success though:

With Application
.StandardFont = "Arial"
.StandardFontSize = "11"
End With

I put this code on the OK button on a form that adds a new sheet.


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
default settings ItsMagic Excel Discussion (Misc queries) 1 August 24th 07 02:34 PM
Trying to restore all default settings Aria Etriano Excel Worksheet Functions 1 December 7th 06 08:58 PM
Default settings for currency Lowkey Setting up and Configuration of Excel 3 August 4th 06 08:29 PM
Default Page Settings Luke Bailey Excel Worksheet Functions 3 May 31st 06 06:23 PM
Spreadsheet Default Settings Kevin Excel Discussion (Misc queries) 1 February 23rd 06 06:03 PM


All times are GMT +1. The time now is 11:18 AM.

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"