#1   Report Post  
!!!
 
Posts: n/a
Default Proper

What is the vba equivalent to the worksheet proper
function?
  #2   Report Post  
Frank Kabel
 
Posts: n/a
Default

Hi
you could always use
application.worksheetfunction.proper

--
Regards
Frank Kabel
Frankfurt, Germany


!!! wrote:
What is the vba equivalent to the worksheet proper
function?

  #3   Report Post  
Peo Sjoblom
 
Posts: n/a
Default

There is none so you can use

Application.Proper(Range("A1"))

as an example

Regards,

Peo Sjoblom

"!!!" wrote:

What is the vba equivalent to the worksheet proper
function?

  #4   Report Post  
David McRitchie
 
Posts: n/a
Default

Hi ....,
and if you would like to refine and improve usage in your macro
for lastnames such as my own, and for a correct title case as
in "A Year to Remember" take a look at
http://www.mvps.org/dmcritchie/excel/proper.htm
You would still have to make some adjustments but that should
get you a better start.
--
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"Peo Sjoblom" wrote...
There is none so you can use
Application.Proper(Range("A1"))

What is the vba equivalent to the worksheet proper function?





  #5   Report Post  
Dave Peterson
 
Posts: n/a
Default

VBA has its own builtin function, too:

Option Explicit
Sub testme()
Dim myStr As String
myStr = "now is the TIME FOr all good MEN TO COME..."
myStr = StrConv(myStr, vbProperCase)
MsgBox myStr
End Sub



"!!!" wrote:

What is the vba equivalent to the worksheet proper
function?


--

Dave Peterson


  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 19
Default Proper

Try this,

Range("A1").Value=Application.WorksheetFunction.Pr oper(Range("A1").Value)

Mike

On Mon, 6 Dec 2004 09:01:08 -0800, "!!!"
wrote:

What is the vba equivalent to the worksheet proper
function?

  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Proper

Or StrConv.


Mike, H wrote:

Try this,

Range("A1").Value=Application.WorksheetFunction.Pr oper(Range("A1").Value)

Mike

On Mon, 6 Dec 2004 09:01:08 -0800, "!!!"
wrote:

What is the vba equivalent to the worksheet proper
function?


--

Dave Peterson
  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Proper

Specifically (to match Mike's example)...

Range("A1").Value = StrConv(Range("A1").Value, vbProperCase)

where the predefined vbProperCase constant tells it to perform the proper
case conversion.

Rick


"Dave Peterson" wrote in message
...
Or StrConv.


Mike, H wrote:

Try this,

Range("A1").Value=Application.WorksheetFunction.Pr oper(Range("A1").Value)

Mike

On Mon, 6 Dec 2004 09:01:08 -0800, "!!!"
wrote:

What is the vba equivalent to the worksheet proper
function?


--

Dave Peterson


  #9   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 229
Default Proper

StrConv is quite a bit faster. 8 times faster, according to my
calculations.


On Feb 21, 7:38*pm, "Rick Rothstein \(MVP - VB\)"
wrote:
Specifically (to match Mike's example)...

Range("A1").Value = StrConv(Range("A1").Value, vbProperCase)

where the predefined vbProperCase constant tells it to perform the proper
case conversion.

Rick

"Dave Peterson" wrote in message

...

Or StrConv.


Mike, H wrote:


Try this,


Range("A1").Value=Application.WorksheetFunction.Pr oper(Range("A1").Value)


Mike


On Mon, 6 Dec 2004 09:01:08 -0800, "!!!"
wrote:


What is the vba equivalent to the worksheet proper
function?


--


Dave Peterson


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
How do I change a spreadsheet from all caps to "Proper" dumbfounded Excel Discussion (Misc queries) 9 November 30th 04 08:22 PM


All times are GMT +1. The time now is 02:20 PM.

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"