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 24th, 2002, 06:50 PM   #1
Excelina
 
Join Date: Mar 2002
Location: Visalia, CA
Posts: 3
Default

hi all,
i have a workbook that opens an other workbook by macro. i have a little mousepointer problem cause the mousepointer in the workbook opened by macro kind of jams and i need to press the right mouse button once in order to make it work normally. my question is how would i simulate this right mouse button pressing by VB code? could sendkey statement or something like that be used here?

sorry for this oversized post, but thatīs the way i am
Excelina is offline   Reply With Quote
Old Mar 24th, 2002, 07:28 PM   #2
Sbirro Cornuto
 
Join Date: Mar 2002
Location: Little Italy
Posts: 93
Default

I have the same exact problem, miss Excelina! I was wondering about that SendKeys thing too, posted a question here, didn't get any answers...

Every time I saw a MVP or punch of Masters logged in, I put my post up again, but that didn't help, they locked my post! Those bastards! ; )

Anyways, I really hope somebody takes you seriously and gives us something to work with, even simple "Don't go there" for that SendKeys statement would do, at least we could stop jerking around with it...
Sbirro Cornuto is offline   Reply With Quote
Old Mar 24th, 2002, 07:42 PM   #3
smozgur
BatCoder
 
Join Date: Mar 2002
Location: Turkey
Posts: 764
Default

Hi,

Do you want to make a Right Click on the document?

If so just call RightDown sub wherever you need.

Private Declare Sub mouse_event Lib "user32" (ByVal dwFlags As Long, ByVal dx As Long, ByVal dy As Long, ByVal cButtons As Long, ByVal dwExtraInfo As Long)
Const MOUSEEVENTF_RIGHTDOWN = &H8
Const MOUSEEVENTF_RIGHTUP = &H10

Public Sub RightDown()
mouse_event MOUSEEVENTF_RIGHTDOWN, 0, 0, 0, 0
mouse_event MOUSEEVENTF_RIGHTUP, 0, 0, 0, 0
End Sub

regards
smozgur is offline   Reply With Quote
Old Mar 26th, 2002, 08:17 AM   #4
Sbirro Cornuto
 
Join Date: Mar 2002
Location: Little Italy
Posts: 93
Default

smozgur, thanks man!

I don't know about Excelina, but for me it works like a charm!


Sbirro Cornuto is offline   Reply With Quote
Old Mar 26th, 2002, 09:33 AM   #5
Dave Hawley
Banned
 
Join Date: Mar 2002
Posts: 1,582
Default

At the risk of sounding smart, get a new mouse!


Dave Hawley is offline   Reply With Quote
Old Mar 26th, 2002, 10:23 AM   #6
Barry Katcher
 
Barry Katcher's Avatar
 
Join Date: Feb 2002
Location: Dog Beach, Florida. Yeaahh!
Posts: 4,018
Default

Dave, would that be something like this?:

Sub Born_To_Shop()

GoTo_RadioShack = True
Purchase_Mouse = True

End Sub
Barry Katcher is offline   Reply With Quote
Old Mar 26th, 2002, 11:00 AM   #7
smozgur
BatCoder
 
Join Date: Mar 2002
Location: Turkey
Posts: 764
Default

Hi Sbirro Cornuto,

Actually i'd like to see your code to find possible solution to avoid it without using right click.

It is nice to hear that it works for you.
smozgur is offline   Reply With Quote
Old Mar 26th, 2002, 11:08 AM   #8
Sbirro Cornuto
 
Join Date: Mar 2002
Location: Little Italy
Posts: 93
Default

Don't worry Dave, I don't see how you could ever sound smart.

Here's little explanation for you wiseasses:

There is nothing wrong with my mouse or with Excelina's (I'm guessing). I just need to automate that Mouse Button event, cause I have few workbooks opening each other through VBA and VB code and there is a lot of Cursor playing in there also, mostly with ani-files. The Cursor changes however wont work everytime without a right click from the mouse and since this is all suppose to be done automaticly I need to automate that mouse click in there, too.

I hope this is all right with you, Dave. And I must warn you that I might ask something else concerning Excel automation in this forum in the future, so if I'm in someway bothering you, feel free to skip my topics...
Sbirro Cornuto is offline   Reply With Quote
Old Mar 26th, 2002, 11:15 AM   #9
Sbirro Cornuto
 
Join Date: Mar 2002
Location: Little Italy
Posts: 93
Default

Quote:
On 2002-03-26 06:00, smozgur wrote:
Hi Sbirro Cornuto,

Actually i'd like to see your code to find possible solution to avoid it without using right click.

It is nice to hear that it works for you.
Thanks for the offer smozgur, but your code really works all right and I don't want to make so many changes to the ani-file loading procedures to avoid this MousePointer jamming, so relax and take the pleasure of knowing that you really have helped a lot. You are awesome!
Sbirro Cornuto is offline   Reply With Quote
Old Mar 26th, 2002, 11:38 AM   #10
Dave Hawley
Banned
 
Join Date: Mar 2002
Posts: 1,582
Default

Wow Sbirro Cornuto,

You should try relaxing a bit.

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 +1. The time now is 09:54 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