MrExcel Message Board
With Macromedia Shockwave Player, you can enjoy multimedia games, learning applications, and product demonstrations on the Web, using exciting new 3D technology. Get it at: http://www.macromedia.com/shockwave/download


Go Back   MrExcel Message Board > Question Forums > Excel Questions

Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only.

Reply
 
Thread Tools Display Modes
Old May 11th, 2002, 10:58 PM   #1
elgringo56
 
Join Date: Apr 2002
Location: Puerto Vallarta, Mexico
Posts: 869
Default

You did so good for me the other day, wanna try to help me on this. I want to turn on and turn off Caps lock under macro control so that when I wnat the operator to input in caps I can make her do it. She wont have to remember. Ivan tried to help me but I dont understand what it is he is trying to have me do.
elgringo56 is offline   Reply With Quote
Old May 12th, 2002, 12:32 AM   #2
Jay Petrulis
MrExcel MVP
 
Jay Petrulis's Avatar
 
Join Date: Mar 2002
Location: Chicago, IL USA
Posts: 2,042
Default

Hi,

You may have good reasons for wanting this, but consider allowing the user to input however s/he feels and then transforming the end result into the case you want.

e.g.

For each cell in Selection
Cell = UCase(Cell)
Next

You will have to play with this a bit, but this will overwrite the cells with ther same value, only in upper case.

An event macro can do this easily.

HTH,
Jay
Jay Petrulis is offline   Reply With Quote
Old May 12th, 2002, 12:36 AM   #3
Lo Lun To
 
Join Date: May 2002
Posts: 8
Default

Quote:
On 2002-05-11 17:58, elgringo56 wrote:
You did so good for me the other day, wanna try to help me on this. I want to turn on and turn off Caps lock under macro control so that when I wnat the operator to input in caps I can make her do it. She wont have to remember. Ivan tried to help me but I dont understand what it is he is trying to have me do.

There does not appear to be anything wrong with Ivan's code. You just have to install it properly.

However, here's an alternative way to do it without API calls :-

- Add a blank worksheet to your workbook and name it Caps Status. Hide this worksheet.

- Put the following two macros in a normal module and assign them to a button each.

Sub Caps_On()
Sheets("Caps Status").[A1].Value = "Caps On"
End Sub

Sub Caps_Off()
Sheets("Caps Status").[A1].Value = "Caps Off"
End Sub

- Put the following in the input worksheet's module

Private Sub Worksheet_Change(ByVal Target As Range)
Dim cell As Range
If Sheets("Caps Status").[A1].Value = "Caps On" Then
Application.EnableEvents = False
For Each cell In Selection
If cell.HasFormula = False Then
cell.Value = UCase(cell.Value)
End If
Next
Application.EnableEvents = True
End If
End Sub


Note :
When the Caps_On button is clicked, any input thereafter will automatically be capitals until the Caps_Off button is clicked.
When the Caps_Off button is clicked, input will be displayed in the normal way (i.e. capitals if the CapsLock key on the keyboard has been pressed, otherwise lower case).
Lo Lun To is offline   Reply With Quote
Old May 12th, 2002, 12:40 AM   #4
elgringo56
 
Join Date: Apr 2002
Location: Puerto Vallarta, Mexico
Posts: 869
Default

Yes, I could do that Jay, and it would work ok. I tried what you have there, I put a lower case value in A1, then did a Range("A1").Select then what you have. Nothing happened.?????????
elgringo56 is offline   Reply With Quote
Old May 12th, 2002, 12:52 AM   #5
Jay Petrulis
MrExcel MVP
 
Jay Petrulis's Avatar
 
Join Date: Mar 2002
Location: Chicago, IL USA
Posts: 2,042
Default

Quote:
On 2002-05-11 19:40, elgringo56 wrote:
Yes, I could do that Jay, and it would work ok. I tried what you have there, I put a lower case value in A1, then did a Range("A1").Select then what you have. Nothing happened.?????????
Hi,

Try the following event macro (place in sheet module, not a regular code module.

Code:
Private Sub Worksheet_Change(ByVal Target As Range)

If Target.Column = 1 And Target.Cells.Count = 1 Then
    If Not Target.HasFormula Then Target = UCase(Target)
End If


End Sub
HTH,
Jay
Jay Petrulis is offline   Reply With Quote
Old May 12th, 2002, 12:53 AM   #6
elgringo56
 
Join Date: Apr 2002
Location: Puerto Vallarta, Mexico
Posts: 869
Default

Jay, I changed your formula a little and it worked.

For Each Cell In Selection
Cell.Value = UCase(Cell.Value)
Next

Thanks, its easy
elgringo56 is offline   Reply With Quote
Old May 12th, 2002, 01:04 AM   #7
elgringo56
 
Join Date: Apr 2002
Location: Puerto Vallarta, Mexico
Posts: 869
Default

This lets me control certian cells. What I have is a program that does inventory and it is in English. The input girls are Meican and speak very little english, so I must make it as fool proof as possible to minimize mistakes. this is the last little thing for it. First program I have done and it all seems to work nicely. all you guys have been a really big help to me in this. I may take it up as a hobby. Thanks lots
elgringo56 is offline   Reply With Quote
Old May 12th, 2002, 01:35 AM   #8
mdfh
 
Join Date: Apr 2002
Posts: 15
Default

[quote]
On 2002-05-11 19:53, elgringo56 wrote:
Jay, I changed your formula a little and it worked.

For Each Cell In Selection
Cell.Value = UCase(Cell.Value)
Next

Thanks, its easy

[quote]


You were already provided with this solution in one of your ealier postings.
You waste people's time by starting so many different threads about the same thing.
mdfh is offline   Reply With Quote
Old May 12th, 2002, 02:15 AM   #9
elgringo56
 
Join Date: Apr 2002
Location: Puerto Vallarta, Mexico
Posts: 869
Default

Sorry, but I dont believe I was. If you feel that I am wasting peoples time, I appologize, However, I dont think I got this one earlier.
elgringo56 is offline   Reply With Quote
Old May 12th, 2002, 02:24 AM   #10
elgringo56
 
Join Date: Apr 2002
Location: Puerto Vallarta, Mexico
Posts: 869
Default

mdfh, what I got was this, which is not the same, yes, the same line is in it, but it didn't do what I needed. If you wish to watchdog and criticize, at least do it accuratley. I dont appreciate snide comments made when I am trying to work, that is not what this is for. a lot of people tried to help me and I appreciate that very much.

Private Sub Worksheet_Change(ByVal Target As Range)
Dim cell As Range
Application.EnableEvents = False
For Each cell In Selection
If cell.HasFormula = False Then
cell.Value = UCase(cell.Value)
End If
Next
Application.EnableEvents = True
End Sub
elgringo56 is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT +1. The time now is 12:41 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
All contents Copyright 1998-2009 by MrExcel Consulting.
diabetic desserts recipes recipes Diabetic Soups Holiday Pizza Recipes Popcorn Recipes Recipes For Microwave Pasta Recipes Casserole Recipes Chili Recipes Curry Recipes Crockpot Recipes Apples Recipes Bread Recipes Vegetarian Recipes Vegetable recipes Desserts Recipes Appetizers Ethnic Recipes Meat Dishes Barbecue Recipes Sauces Recipes Marinade Recipes Low Fat Recipes Frugal Gourmet Kitchen Classics Recipes On The Grill Cook Books Seafood Recipes Cajun Recipes Breads Low Fat Low Fat Breads Bread Machine Recipes Yeast Breads Quick Breads Fat Free Vegetarian Salad Recipes Eggplant Recipes Radish Recipes Tomato Recipes Jalapeno Recipes Potato Recipes Lettuce Recipes Cabbage Recipes Beans Ambrosia Recipes Biscotti Recipes Desserts Low Fat Cookie Recipes Cheesecake Recipes Cake Recipes Pie Recipes Muffin Recipes Custard Recipes Best Appetizers Appetizers Low Fat Salsa Recipes Dip Recipes International Recipes Afghan Recipes Alaska Recipes French Recipes German Recipes Greek Recipes Italian Recipes Spanish Recipes Thai Recipes Korean Recipes Chinese Recipes Mexican Recipes Indian Recipes Beef Recipes Pork Pork & Ham Pork Butts Pork Chop Recipes Pork Ribs Rulled Pork Poultry Recipes Stews Recipes Ground Beef Barbecue Grill Barbecue Smoker All Purpose Sauce BBQ Sauce Barbecue Sauce Carolina BBQ Sauce Pickle Recipes Marinades Smoking Low Fat Appetizers & Dips Low Fat Breakfast Low Fat Cakes Low Fat Cheesecakes Low Fat Cookies Low Fat Desserts Low Fat Fish & Seafood Low Fat Meats Low Fat Pasta Low Fat Pies Low Fat Salads Low Fat Sandwiches Low Fat Sauces & Condiments Low Fat Sides Low Fat Soups Low Fat Vegetarian Baker's Dozen Taste of Home Recipe Book Bon Appetit Cookbook Blacktie Cookbook Buster Cook Book Cookbook USA Cook Book Cook Book Sara's Cookbook Sara's Cookbook Appetizers and Dips Poultry recipes Diabetic recipes Holiday recipes Miscellaneous recipes 110 recipes 1986 Usenet cookbook 2900 recipes Cyberrealm recipes Great sysops of world Specialty recipes Ceideburg recipes Cheese recipes Chili recipes Fruits recipes Garlic recipes Great chefs of NY Londontowne recipes Raisins recipes Recipes for kids US Food Vegetarian recipes Bread recipes Drinks Meat Dishes Brisket recipes Caribou recipes Chicken recipes Filet mignons recipes Pork recipes Swordfish recipes Turkey recipes Pasta recipes Uncategorized recipes Ethnic recipes Canada recipes English recipes Ethiopia recipes Germany recipes Greece recipes Mexican recipes Philippines recipes Welsh recipes Microwave recipes Soups recipes Vegetable recipes Asparagus recipes Barley recipes Brown rice recipes Lentil recipes Mushrooms recipes Salads recipes Wild rice Desserts recipes Cakes recipes Chocolate recipes Cookies recipes Ice cream recipes