Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() hi experts.... i just want to ask.... how can i use the PROPER function in macros?....because i want t automatically change those text not in PROPER case as soon as i clic anywhere on the worksheet...only columns C and D will b affected...thanks a lot.. -- tweety12 ----------------------------------------------------------------------- tweety127's Profile: http://www.excelforum.com/member.php...fo&userid=3467 View this thread: http://www.excelforum.com/showthread.php?threadid=55100 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Application.WorksheetFunction.Proper(Put string variable here)
"tweety127" wrote: hi experts.... i just want to ask.... how can i use the PROPER function in macros?....because i want to automatically change those text not in PROPER case as soon as i click anywhere on the worksheet...only columns C and D will be affected...thanks a lot... -- tweety127 ------------------------------------------------------------------------ tweety127's Profile: http://www.excelforum.com/member.php...o&userid=34673 View this thread: http://www.excelforum.com/showthread...hreadid=551002 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
sub ConvertString()
Dim cell as Range, rng as range On Error Resume Next set rng = selection.SpecialCells(xlconstants,xlTextValues) On Error goto 0 if not rng is nothing then for each cell in rng cell.value = strconv(cell.value,vbProperCase) Next End if end sub -- Regards, Tom Ogilvy "tweety127" wrote: hi experts.... i just want to ask.... how can i use the PROPER function in macros?....because i want to automatically change those text not in PROPER case as soon as i click anywhere on the worksheet...only columns C and D will be affected...thanks a lot... -- tweety127 ------------------------------------------------------------------------ tweety127's Profile: http://www.excelforum.com/member.php...o&userid=34673 View this thread: http://www.excelforum.com/showthread...hreadid=551002 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
On Error GoTo ws_exit Application.EnableEvents = False With Target If .Column = 3 Or .Column = 4 Then .Value = Application.Proper(.Value) End If End With ws_exit: Application.EnableEvents = True On Error GoTo 0 End Sub This is worksheet event code, which means that it needs to be placed in the appropriate worksheet code module, not a standard code module. To do this, right-click on the sheet tab, select the View Code option from the menu, and paste the code in. -- HTH Bob Phillips (replace xxxx in the email address with gmail if mailing direct) "tweety127" wrote in message ... hi experts.... i just want to ask.... how can i use the PROPER function in macros?....because i want to automatically change those text not in PROPER case as soon as i click anywhere on the worksheet...only columns C and D will be affected...thanks a lot... -- tweety127 ------------------------------------------------------------------------ tweety127's Profile: http://www.excelforum.com/member.php...o&userid=34673 View this thread: http://www.excelforum.com/showthread...hreadid=551002 |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() :) A Big Thanks To All Of You!!! : -- tweety12 ----------------------------------------------------------------------- tweety127's Profile: http://www.excelforum.com/member.php...fo&userid=3467 View this thread: http://www.excelforum.com/showthread.php?threadid=55100 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Help w/ the PROPER function | Excel Worksheet Functions | |||
PROPER function | Excel Worksheet Functions | |||
How do I use the PROPER function? | Excel Worksheet Functions | |||
PROPER function | Excel Worksheet Functions | |||
How do I use the PROPER function? | Excel Discussion (Misc queries) |