Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default VBA Proper Case Code


Hello!

I wrote this simple code to change the case in a cell to proper when a
macro button is pushed, but it doesn't work.


I don't get any errors, but when I run the macro, the screen just
blinks like something is happening, but I don't know what?

Where's the problem?

Sub CaseChange()
Formula = "Proper(A1)"
End Sub

Thanks,
EMoe


--
EMoe
------------------------------------------------------------------------
EMoe's Profile: http://www.excelforum.com/member.php...o&userid=23183
View this thread: http://www.excelforum.com/showthread...hreadid=373999

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default VBA Proper Case Code


You haven't refenced a cell.

All that code will do is place the string "Proper(A1)" in the variable
Formula.

Perhaps something like this?

Code:
--------------------

Sub MakeProper()
ActiveCell = WorksheetFunction.Proper(ActiveCell.Value)
End Sub

--------------------


--
Norie
------------------------------------------------------------------------
Norie's Profile: http://www.excelforum.com/member.php...o&userid=19362
View this thread: http://www.excelforum.com/showthread...hreadid=373999

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 691
Default VBA Proper Case Code

You might want to take a look at
http://www.mvps.org/dmcritchie/excel/proper.htm

as a macro would normally work with a selection chosen before
running the macro.
---
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

"Norie" wrote in message
...

You haven't refenced a cell.

All that code will do is place the string "Proper(A1)" in the variable
Formula.

Perhaps something like this?

Code:
--------------------

Sub MakeProper()
ActiveCell = WorksheetFunction.Proper(ActiveCell.Value)
End Sub

--------------------


--
Norie
------------------------------------------------------------------------
Norie's Profile: http://www.excelforum.com/member.php...o&userid=19362
View this thread: http://www.excelforum.com/showthread...hreadid=373999



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default VBA Proper Case Code


This works fine.

But what if I wanted to change all the text in a range of cells e.g
from A1 to A30?

EMo

--
EMo
-----------------------------------------------------------------------
EMoe's Profile: http://www.excelforum.com/member.php...fo&userid=2318
View this thread: http://www.excelforum.com/showthread.php?threadid=37399

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 from upper case to proper case in excel 2002 CT Man[_2_] Excel Discussion (Misc queries) 8 January 8th 08 06:14 PM
excel'03 how to convert a column from upper case to proper case sharie palmer Excel Discussion (Misc queries) 1 January 30th 06 11:50 PM
Excel: How do I change all upper case ss to proper case? Moosieb Excel Worksheet Functions 3 January 13th 06 12:45 AM
Changing Upper case to Proper Case Mountain Excel Worksheet Functions 1 January 13th 05 10:37 PM
Proper case code not working right Juan Excel Programming 3 April 16th 04 11:11 PM


All times are GMT +1. The time now is 01:35 PM.

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"