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 Mar 21st, 2002, 11:57 AM   #1
firuz
New Member
 
Join Date: Mar 2002
Posts: 7
Default

I have created userform showing comment text of active cell. I want to scroll to other cells while userform is shown and view their comments in the same userform. But i cant access worksheet cells. What to do?




[ This Message was edited by: firuz on 2002-03-21 12:22 ]
firuz is offline   Reply With Quote
Old Mar 21st, 2002, 04:19 PM   #2
dk
MrExcel MVP
 
Join Date: Feb 2002
Location: Sydney, Australia
Posts: 2,908
Default

If you're using Excel 2000 onwards you can show the form as modeless i.e. you can select other objects (e.g. cells) while the form is visible.

Userform1.Show vbModeless

If not then take a look here at a workaround for Excel 97...

http://www.bmsltd.co.uk/DLCount/DLCo...delessForm.zip

HTH,
D
dk is offline   Reply With Quote
Old Mar 22nd, 2002, 10:00 AM   #3
Tom Schreiner
Board Regular
 
Join Date: Mar 2002
Location: Cincinnati, Ohio, USA
Posts: 6,824
Default

You could place four buttons on your form for Left, Right, Up, Down
In each buttons click event place the code using Excels smallscroll method

If you are not familiar with this method, then record a macro and scroll all over the screen to see the different commands.

If you really wanna have fun, draw an image on your form and capture the directional movement of your mouse and use the scrolling methods in the mousemove event.

Have fun and good luck!!!
Tom Schreiner is offline   Reply With Quote
Old Mar 24th, 2002, 02:14 AM   #4
firuz
New Member
 
Join Date: Mar 2002
Posts: 7
Default

actually i presupposed that i would have to create navigation buttons and thus solve update fix after each selection change. But do you mean that any other way of scrolling on worksheet and simultaneous userform update is impossible?
firuz is offline   Reply With Quote
Old Mar 24th, 2002, 03:43 AM   #5
Dave Hawley
Banned
 
Join Date: Feb 2002
Posts: 1,582
Default

Hi firuz

You could use a RefEdit control and allow the user to select the cell. But this is really not needed as you can easily fill (say a ComBoBox) with cell addresses of all Comment cells.

Private Sub UserForm_Initialize()
Dim rComments As Range
Dim rCells As Range

On Error Resume Next
Set rComments = Cells.SpecialCells(xlCellTypeComments)
If Not rComments Is Nothing Then
For Each rCells In rComments
ComboBox1.AddItem rCells.Address
Next rCells
End If
On Error GoTo 0

End Sub

Dave Hawley is offline   Reply With Quote
Old Mar 24th, 2002, 04:49 AM   #6
firuz
New Member
 
Join Date: Mar 2002
Posts: 7
Default

Dave, i can not preassume what would be my commented cells for pre-entering for combobox.
My main problem now is update of textbox on userform after any event via scrollbar or cmdbutton.on loading userform textbox reflects comment of cell, but then there is no any change.

[ This Message was edited by: firuz on 2002-03-24 03:50 ]
firuz is offline   Reply With Quote
Old Mar 24th, 2002, 05:22 AM   #7
Tom Schreiner
Board Regular
 
Join Date: Mar 2002
Location: Cincinnati, Ohio, USA
Posts: 6,824
Default

The workaround given by DK is perfect.
I wish I would have known this when I had 97.
http://www.bmsltd.co.uk/DLCount/DLCo...delessForm.zip

If you need help in editing to suit your purpose, then post the code you are currently using.

And thanks to dk
Tom Schreiner is offline   Reply With Quote
Old Mar 24th, 2002, 05:46 AM   #8
Dave Hawley
Banned
 
Join Date: Feb 2002
Posts: 1,582
Default

firuz, I am not sure I understand you. My code doesn't "preassume" the comment cells, it automatically pulls in ONLY the comment cell addresses. If the sheet has none, then no cell addresses are pulled in. If on the other hand Cells A1, D5, H100 had comments these would be the only cell addresses the user would see.

Although Excel 2000 does have modal UserForms, I rarely use the feature as it opens a real can of worms. It's bad enough trying cover all angles on a UserForm without giving the user full access to the Excel interface and all it's features.

The idea behind it is the user would simply choose the cell address from the ComboBox and the comment text in this cell is displayed for them. This must surely be mre user friendly than the user having find then select the comment cell(s).


My second choice would be as I said the RefEdit Control.




Dave Hawley 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 03:26 AM.


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