![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Mar 2002
Posts: 34
|
Mailing stuff worked thanks to earlier posts.
I need to set the sheet to upper case and then modify any changes to the sheet to upper case. I've tried Ucase in a Private Sub Worksheet_SelectionChange(ByVal Target As Range) Statement, but just get type mismatch errors, or it simply doesn't work. Can anyone help? Matt |
|
|
|
|
|
#2 |
|
Legend
Join Date: Feb 2002
Location: Minneapolis, Mn, USA
Posts: 9,704
|
|
|
|
|
|
|
#3 |
|
Legend
Join Date: Feb 2002
Location: Minneapolis, Mn, USA
Posts: 9,704
|
To clean up existing data:
Put this in a normal module and run. _________________ Cheers, NateO ![]() [ This Message was edited by: NateO on 2002-05-14 09:44 ] |
|
|
|
|
|
#4 |
|
New Member
Join Date: Mar 2002
Posts: 34
|
hI GUYS
OK. I tried the 'If Target <> "" Then Target = UCase(Target)' one, and the other one. Both worked, but I have some code to clear the form of all entered data, and one to save the data, print the form etc. Each time there's any change, especially on clearing out the form data, even deleting just entered data, I get a type mismatch on this line of code. The users won't like it, you know |
|
|
|
|
|
#5 |
|
Board Regular
Join Date: Mar 2002
Location: Cincinnati, Ohio, USA
Posts: 6,824
|
Hi
Your code to clear... Beginning of procedure: Application.EnableEvents = False this will disable the change event. At the end of the same procedure re-enable your events like this: Application.EnableEvents = True A little added surety: Change: 'If Target <> "" Then Target = UCase(Target) To: 'If Target <> "" And Target <> Empty Then Target = UCase(Target) Tom [ This Message was edited by: TsTom on 2002-05-15 01:35 ] |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|