|
-
Feb 9th, 2000, 06:15 AM
#1
Thread Starter
Member
x = "hello, how are you?"
I want the first character in x to be capital each time. So that it makes -
x = "Hello, how are you?"
How do I do that? Supose I want to put a "." at the end of every variable, how do I do that? Thanks
-
Feb 9th, 2000, 06:51 AM
#2
Hyperactive Member
Dim hold As String
'to change the first letter to a capital
'using the form caption as an example
hold = Left(Me.Caption, 1)
hold = UCase(hold)
Me.Caption = hold & Right(Me.Caption, Len(Me.Caption) - 1)
'to put a full stop at the end
Me.Caption = Me.Caption & "."
-
Feb 9th, 2000, 07:11 AM
#3
Bigley's answer works just fine, but it's easier than that.
Me.Caption = UCase(Left(Me.Caption, 1)) & Right(Me.Caption, Len(Me.Caption) - 1) & "."
(or substitute x for Me.Caption)
------------------
Marty
What did the fish say when it hit the concrete wall?
> > > > > "Dam!"
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|