Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Format text - Event
Looking for a worksheet event code which would format text entry in
cells as follows: ..HorizontalAlignment = xlJustify .VerticalAlignment = xlBottom .WrapText = True .Orientation = 0 .AddIndent = False .IndentLevel = 0 .ShrinkToFit = False .ReadingOrder = xlContext .MergeCells = False Can anybody help Thxs |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Format text - Event
Hello al007, You can create a new Style for the Workbook. Your Style then become the default for all worksheets, eliminating redundant worksheet even code. Sincerely, Leith Ros -- Leith Ros ----------------------------------------------------------------------- Leith Ross's Profile: http://www.excelforum.com/member.php...fo&userid=1846 View this thread: http://www.excelforum.com/showthread.php?threadid=48808 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Format text - Event
I'm already using a style with cells formatted as custom numbers &
can't have both in text. That's why I was thinking about a worksheet event - can u help pls thxs |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Format text - Event
you could use the worksheet's CHANGE event. This is fired when teh ENTER key
is pressed. The 'Target' variable is teh cell or cells changed. Since I want to avoid formatting numbers, I want to test for them, The Target.Range("A1") ensures that I test the first cell if more than one cell was enterrd. Paste this code into the worksheet's code page. Tip: a quick way to the code page is to select it from the pop-up menu that appears when you RIGHT-Click thesheet tab... Option Explicit Private Sub Worksheet_Change(ByVal Target As Range) If Not IsNumeric(Target.Range("A1")) Then With Target .HorizontalAlignment = xlJustify .VerticalAlignment = xlBottom .WrapText = True .Orientation = 0 .AddIndent = False .IndentLevel = 0 .ShrinkToFit = False .ReadingOrder = xlContext .MergeCells = False End With End If End Sub "al007" wrote: Looking for a worksheet event code which would format text entry in cells as follows: ..HorizontalAlignment = xlJustify .VerticalAlignment = xlBottom .WrapText = True .Orientation = 0 .AddIndent = False .IndentLevel = 0 .ShrinkToFit = False .ReadingOrder = xlContext .MergeCells = False Can anybody help Thxs |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Format text - Event
Thxs very much !!!!!!!!!!
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Need help with converting CUSTOM format/TEXT format to DATE format | Excel Worksheet Functions | |||
Trigger Event on Format Change | Excel Discussion (Misc queries) | |||
Format Painter and Worksheet Change Event | Excel Programming | |||
Format Event Trigger (XL2002) | Excel Programming | |||
temporary cell format event | Excel Programming |