proper

G

geebee

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
 
D

Don Guillett

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

JE McGimpsey

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)
 
D

Dave Peterson

And VBA has its own strconv function, too.

You can read VBAs help for more info.
 
C

Chip Pearson

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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top