#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 190
Default proper

hi,

i have the following:

dim test as string
test = proper(sheets("sheet1").range("A1").value)

but this is not working... i am just trying to assign the Proper(A1) as a
string.

please help

thanks in advance,
geebee

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,624
Default proper

Proper is not a VBA function, it's an XL function. Try:

Dim test As String
test = Application.WorksheetFunction.Proper( _
Worksheets("Sheet1").Range("A1").Text)


In article ,
geebee (noSPAMs) wrote:

hi,

i have the following:

dim test as string
test = proper(sheets("sheet1").range("A1").value)

but this is not working... i am just trying to assign the Proper(A1) as a
string.

please help

thanks in advance,
geebee

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,124
Default proper


test = proper(sheets("sheet1").range("A1").value)
test = worksheetfunction.proper(sheets("sheet1").range("A 1").value)

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"geebee" (noSPAMs) wrote in message
...
hi,

i have the following:

dim test as string
test = proper(sheets("sheet1").range("A1").value)

but this is not working... i am just trying to assign the Proper(A1) as a
string.

please help

thanks in advance,
geebee


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default proper


VBA has a function name StrConv that allows you to change a string to
various formats:

Dim S As String
Dim InText As String
InText = Range("A1").Text
S = StrConv(InText, vbProperCase)
Debug.Print S

Cordially,
Chip Pearson
Microsoft MVP
Excel Product Group
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)



On Tue, 9 Dec 2008 07:01:41 -0800, geebee
(noSPAMs) wrote:

hi,

i have the following:

dim test as string
test = proper(sheets("sheet1").range("A1").value)

but this is not working... i am just trying to assign the Proper(A1) as a
string.

please help

thanks in advance,
geebee

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default proper


And VBA has its own strconv function, too.

You can read VBAs help for more info.

geebee wrote:

hi,

i have the following:

dim test as string
test = proper(sheets("sheet1").range("A1").value)

but this is not working... i am just trying to assign the Proper(A1) as a
string.

please help

thanks in advance,
geebee


--

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
Not Proper! Adam Excel Worksheet Functions 2 September 19th 07 12:08 PM
proper afdmello Excel Discussion (Misc queries) 3 October 11th 05 09:48 AM
=PROPER Snowcap Excel Discussion (Misc queries) 1 January 21st 05 01:46 PM
=PROPER Snowcap Excel Discussion (Misc queries) 2 January 21st 05 12:19 AM
=proper Scrappy[_2_] Excel Programming 3 November 13th 03 09:43 PM


All times are GMT +1. The time now is 09:05 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"