![]() |
![]() |
|
|||||||
| 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 |
|
Join Date: Mar 2002
Location: Visalia, CA
Posts: 3
|
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 |
|
|
|
|
|
#2 |
|
Join Date: Mar 2002
Location: Little Italy
Posts: 93
|
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... |
|
|
|
|
|
#3 |
|
BatCoder
Join Date: Mar 2002
Location: Turkey
Posts: 764
|
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 |
|
|
|
|
|
#4 |
|
Join Date: Mar 2002
Location: Little Italy
Posts: 93
|
smozgur, thanks man!
I don't know about Excelina, but for me it works like a charm! |
|
|
|
|
|
#5 |
|
Banned
Join Date: Mar 2002
Posts: 1,582
|
At the risk of sounding smart, get a new mouse!
|
|
|
|
|
|
#6 |
|
Join Date: Feb 2002
Location: Dog Beach, Florida. Yeaahh!
Posts: 4,018
|
Dave, would that be something like this?:
Sub Born_To_Shop() GoTo_RadioShack = True Purchase_Mouse = True End Sub |
|
|
|
|
|
#7 |
|
BatCoder
Join Date: Mar 2002
Location: Turkey
Posts: 764
|
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. |
|
|
|
|
|
#8 |
|
Join Date: Mar 2002
Location: Little Italy
Posts: 93
|
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... |
|
|
|
|
|
#9 | |
|
Join Date: Mar 2002
Location: Little Italy
Posts: 93
|
Quote:
|
|
|
|
|
|
|
#10 |
|
Banned
Join Date: Mar 2002
Posts: 1,582
|
Wow Sbirro Cornuto,
You should try relaxing a bit. |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|