MrExcel Message Board

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 Apr 15th, 2002, 05:43 AM   #1
christal
New Member
 
Join Date: Apr 2002
Posts: 45
Default

I have a list of items in column A, with prices for those items in column B - Z. I want the viewer to easily see the the items and their corresponding prices, while using the arrow key to move up and down the item list. Is there a way to move up and down the item list with your arrow keys, while highlighting the whole row of data?

Appreciate any help on this simple problem!

Thanks
christal is offline   Reply With Quote
Old Apr 15th, 2002, 05:48 AM   #2
fred
New Member
 
Join Date: Mar 2002
Location: Brussels
Posts: 5
Default

quick and dirty: simply select tthe row by clicking on the leftmost column (before column A): the whole row will be highlighted
fred is offline   Reply With Quote
Old Apr 15th, 2002, 05:52 AM   #3
christal
New Member
 
Join Date: Apr 2002
Posts: 45
Default

I was able to figure out this part, but I wanted to be able to scroll up and down on the item list only...., not clicking with my mouse on the row number.

Any ideas??

Sorry for not being too clear before!

Thanks
christal is offline   Reply With Quote
Old Apr 15th, 2002, 07:16 AM   #4
daleyman
Board Regular
 
Join Date: Mar 2002
Location: London, UK
Posts: 167
Default

Try this...

Go into the Visual basic editor and double click on the worksheet you want this to work for. Paste into it the following code...



Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Cells.Interior.ColorIndex = xlNone
Target.EntireRow.Interior.ColorIndex = 36
End Sub


If you want this slightly altered, so that it does not remove heading formats, or so that it only works for certain rows or rows with certain values, reply again with details.

Hope this works for you.
__________________

<table style="background-color:#0e54be" cellspacing="1" cellpadding="2"><td style="background-color:#ceffff;font-family:arial;color:#072c63;font-size:8pt;">***DALEY** :P**</td></table>
daleyman is offline   Reply With Quote
Old Apr 15th, 2002, 08:05 AM   #5
christal
New Member
 
Join Date: Apr 2002
Posts: 45
Default

O.K... Sorry to have to say this... But (

I have never done any work in VB. So I tried going into VB and double clicking on the sheet number and a window pop-up where I selected worksheet and section change. Pasted the code in and saved the update and went back into excel to see what damage I did. Nothing happened!! Got any ideas for this "bush-leaguer"??

Thanks for the great help!

[ This Message was edited by: christal on 2002-04-15 07:06 ]
christal is offline   Reply With Quote
Old Apr 15th, 2002, 11:10 AM   #6
Al Chara
MrExcel MVP
 
Join Date: Feb 2002
Location: Monterrey, Mexico
Posts: 1,433
Default

The code should work. Follow the below steps:

1. In Excel, hit Alt+F11 to open VBA
2. Look on the left of the VBA window for "VBAProject"
3. Double click your sheet name that you want to hightlight rows.
4. Look to the left for the big blank page and paste the following code:
Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range) 
Cells.Interior.ColorIndex = xlNone 
Target.EntireRow.Interior.ColorIndex = 3 
End Sub
5. Close the VBA window to return to excel. And click in a cell and watch the whole row be highlighted.
6. Make sure that you have macros enabled (ie make sure you are not running on high level security).




__________________
Kind regards,

Al Chara
Al Chara is offline   Reply With Quote
Old Apr 15th, 2002, 11:38 AM   #7
christal
New Member
 
Join Date: Apr 2002
Posts: 45
Default

That was a great help....BUT, I couldn't get it to work on the spreadsheet I needed it to work on. I got the function to work on a blank spreadsheet... so I know it wasn't something I did! I checked the security options, and those are O.K.!! Any further ideas??

Thanks again!!
christal is offline   Reply With Quote
Old Apr 15th, 2002, 01:51 PM   #8
daleyman
Board Regular
 
Join Date: Mar 2002
Location: London, UK
Posts: 167
Default

start again, then. go into the vb editor, double click on the sheet you need the code to work on, this should open the module.

Delete everything in it, and paste the code.

then save the workbook, close it, then open it again, sometimes this works!

Good luck.
__________________

<table style="background-color:#0e54be" cellspacing="1" cellpadding="2"><td style="background-color:#ceffff;font-family:arial;color:#072c63;font-size:8pt;">***DALEY** :P**</td></table>
daleyman is offline   Reply With Quote
Old Apr 16th, 2002, 05:06 AM   #9
christal
New Member
 
Join Date: Apr 2002
Posts: 45
Default

Thanks Daleyman.....

I was already ahead of you... I tried deleting the code and doing it over again, and it didn't work. But I did copy and paste the data to a new workbook, and cut and paste the VB code in again. And to my surprise it worked!! Yeppie!! But I will tell you one thing.. you cannot apply any patterns to cells after the VB code has been put in... so I had to delete the code, and then format the cells again. Thanks for all your help!!

Christal
christal is offline   Reply With Quote
Old Apr 17th, 2002, 06:18 AM   #10
christal
New Member
 
Join Date: Apr 2002
Posts: 45
Default

I was able to cut and paste the VB code into the editor, and YES, it finally worked! Problem now, is that the color that I had on my Excel spreadsheet is now gone! Does anyone have an idea, as to how I can keep the color format and still use the highlighted scrolling function?

Much thanks!

Christal
christal 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 -4. The time now is 12:13 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
All contents Copyright 1998-2012 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