Re: $$Excel-Macros$$ Re: GetAsyncKeyState not working window 7 office 2010 x64

2011-02-09 Thread rcamarda
Here it is (I used the new google groups )

-- 
--
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 
To post to this group, send email to excel-macros@googlegroups.com

<><><><><><><><><><><><><><><><><><><><><><>
Like our page on facebook , Just follow below link
http://www.facebook.com/discussexcel


mouse test.xlsm
Description: application/vnd.ms-excel.sheet.macroenabled.12


Re: $$Excel-Macros$$ Re: GetAsyncKeyState not working window 7 office 2010 x64

2011-02-09 Thread rcamarda
Im not using the right mouse.
If you suggest that I use the right mouse, I'd need to disable the
format popup if I am in my target cell. IE
If Target.Count = 1 and Target.Column = 34 and Target.Value > 0 And
(GetAsyncKeyState(vbKeyLButton) = 1 And &H8000) Then
' my logic
End If

On Feb 9, 9:25 am, ashish koul  wrote:
> r u using right button also
>
>
>
>
>
>
>
>
>
> On Wed, Feb 9, 2011 at 7:53 PM, ashish koul  wrote:
> > can you share your workbook
>
> > On Wed, Feb 9, 2011 at 6:57 PM, rcamarda wrote:
>
> >> Ashish,
> >> 1. Your code worked from your example.
> >> 2. in my other tests, I added added the "= 1" I had, and some of my
> >> test sheets worked.
> >> 3. It didnt work when i put it into my sheet where I needed it,
> >> GetAsyncKeyState(vbKeyLButton) = 1 And &H8000 but it didnt work
> >> 4. I opened a fresh excel, pasted your code and it worked.
> >> 5. My sheet has macro enabled, so I saved your test book as xlsm and
> >> your test still works.
> >> 6. I can create a new sheet in my excel, and the code works on that
> >> sheet. so some sheets it works, others it does not.
> >> 7. On the sheet I need to trap the mouse, all code in your test works,
> >> except the left mouse. In other sheets it traps everything
> >> 8. When I use only
> >> MsgBox GetAsyncKeyState(vbKeyLButton)
> >> in my Worksheet_SelectionChange, it shows just 0 (zero).
>
> >> 
> >> *rips hair out*
> >> 
>
> >> Anyone have ideas on how to determine why my sheet doesnt work, but a
> >> blank fresh one does?
>
> >> --
>
> >> ---
> >>  ---
> >> Some important links for excel users:
> >> 1. Follow us on TWITTER for tips tricks and links :
> >>http://twitter.com/exceldailytip
> >> 2. Join our LinkedIN group @http://www.linkedin.com/groups?gid=1871310
> >> 3. Excel tutorials athttp://www.excel-macros.blogspot.com
> >> 4. Learn VBA Macros athttp://www.quickvba.blogspot.com
> >> 5. Excel Tips and Tricks athttp://exceldailytip.blogspot.com
>
> >> To post to this group, send email to excel-macros@googlegroups.com
>
> >> <><><><><><><><><><><><><><><><><><><><><><>
> >> Like our page on facebook , Just follow below link
> >>http://www.facebook.com/discussexcel
>
> >  --
> > *Regards*
> > * *
> > *Ashish Koul*
> > *akoul*.*blogspot*.com 
> > *akoul*.wordpress.com 
> > My Linkedin Profile 
>
> > P Before printing, think about the environment.
>
> --
> *Regards*
> * *
> *Ashish Koul*
> *akoul*.*blogspot*.com 
> *akoul*.wordpress.com 
> My Linkedin Profile 
>
> P Before printing, think about the environment.

-- 
--
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 
To post to this group, send email to excel-macros@googlegroups.com

<><><><><><><><><><><><><><><><><><><><><><>
Like our page on facebook , Just follow below link
http://www.facebook.com/discussexcel


Re: $$Excel-Macros$$ Re: GetAsyncKeyState not working window 7 office 2010 x64

2011-02-09 Thread ashish koul
r u using right button also

On Wed, Feb 9, 2011 at 7:53 PM, ashish koul  wrote:

> can you share your workbook
>
> On Wed, Feb 9, 2011 at 6:57 PM, rcamarda wrote:
>
>> Ashish,
>> 1. Your code worked from your example.
>> 2. in my other tests, I added added the "= 1" I had, and some of my
>> test sheets worked.
>> 3. It didnt work when i put it into my sheet where I needed it,
>> GetAsyncKeyState(vbKeyLButton) = 1 And &H8000 but it didnt work
>> 4. I opened a fresh excel, pasted your code and it worked.
>> 5. My sheet has macro enabled, so I saved your test book as xlsm and
>> your test still works.
>> 6. I can create a new sheet in my excel, and the code works on that
>> sheet. so some sheets it works, others it does not.
>> 7. On the sheet I need to trap the mouse, all code in your test works,
>> except the left mouse. In other sheets it traps everything
>> 8. When I use only
>> MsgBox GetAsyncKeyState(vbKeyLButton)
>> in my Worksheet_SelectionChange, it shows just 0 (zero).
>>
>>
>> 
>> *rips hair out*
>> 
>>
>>
>> Anyone have ideas on how to determine why my sheet doesnt work, but a
>> blank fresh one does?
>>
>> --
>>
>> --
>> Some important links for excel users:
>> 1. Follow us on TWITTER for tips tricks and links :
>> http://twitter.com/exceldailytip
>> 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
>> 3. Excel tutorials at http://www.excel-macros.blogspot.com
>> 4. Learn VBA Macros at http://www.quickvba.blogspot.com
>> 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
>>
>> To post to this group, send email to excel-macros@googlegroups.com
>>
>> <><><><><><><><><><><><><><><><><><><><><><>
>> Like our page on facebook , Just follow below link
>> http://www.facebook.com/discussexcel
>>
>
>
>
>  --
> *Regards*
> * *
> *Ashish Koul*
> *akoul*.*blogspot*.com 
> *akoul*.wordpress.com 
> My Linkedin Profile 
>
>
> P Before printing, think about the environment.
>
>
>


-- 
*Regards*
* *
*Ashish Koul*
*akoul*.*blogspot*.com 
*akoul*.wordpress.com 
My Linkedin Profile 


P Before printing, think about the environment.

-- 
--
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 
To post to this group, send email to excel-macros@googlegroups.com

<><><><><><><><><><><><><><><><><><><><><><>
Like our page on facebook , Just follow below link
http://www.facebook.com/discussexcel


Re: $$Excel-Macros$$ Re: GetAsyncKeyState not working window 7 office 2010 x64

2011-02-09 Thread ashish koul
can you share your workbook

On Wed, Feb 9, 2011 at 6:57 PM, rcamarda  wrote:

> Ashish,
> 1. Your code worked from your example.
> 2. in my other tests, I added added the "= 1" I had, and some of my
> test sheets worked.
> 3. It didnt work when i put it into my sheet where I needed it,
> GetAsyncKeyState(vbKeyLButton) = 1 And &H8000 but it didnt work
> 4. I opened a fresh excel, pasted your code and it worked.
> 5. My sheet has macro enabled, so I saved your test book as xlsm and
> your test still works.
> 6. I can create a new sheet in my excel, and the code works on that
> sheet. so some sheets it works, others it does not.
> 7. On the sheet I need to trap the mouse, all code in your test works,
> except the left mouse. In other sheets it traps everything
> 8. When I use only
> MsgBox GetAsyncKeyState(vbKeyLButton)
> in my Worksheet_SelectionChange, it shows just 0 (zero).
>
>
> 
> *rips hair out*
> 
>
>
> Anyone have ideas on how to determine why my sheet doesnt work, but a
> blank fresh one does?
>
> --
>
> --
> Some important links for excel users:
> 1. Follow us on TWITTER for tips tricks and links :
> http://twitter.com/exceldailytip
> 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
> 3. Excel tutorials at http://www.excel-macros.blogspot.com
> 4. Learn VBA Macros at http://www.quickvba.blogspot.com
> 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
>
> To post to this group, send email to excel-macros@googlegroups.com
>
> <><><><><><><><><><><><><><><><><><><><><><>
> Like our page on facebook , Just follow below link
> http://www.facebook.com/discussexcel
>



-- 
*Regards*
* *
*Ashish Koul*
*akoul*.*blogspot*.com 
*akoul*.wordpress.com 
My Linkedin Profile 


P Before printing, think about the environment.

-- 
--
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 
To post to this group, send email to excel-macros@googlegroups.com

<><><><><><><><><><><><><><><><><><><><><><>
Like our page on facebook , Just follow below link
http://www.facebook.com/discussexcel


Re: $$Excel-Macros$$ Re: GetAsyncKeyState not working window 7 office 2010 x64

2011-02-09 Thread rcamarda
Ashish,
1. Your code worked from your example.
2. in my other tests, I added added the "= 1" I had, and some of my
test sheets worked.
3. It didnt work when i put it into my sheet where I needed it,
GetAsyncKeyState(vbKeyLButton) = 1 And &H8000 but it didnt work
4. I opened a fresh excel, pasted your code and it worked.
5. My sheet has macro enabled, so I saved your test book as xlsm and
your test still works.
6. I can create a new sheet in my excel, and the code works on that
sheet. so some sheets it works, others it does not.
7. On the sheet I need to trap the mouse, all code in your test works,
except the left mouse. In other sheets it traps everything
8. When I use only
MsgBox GetAsyncKeyState(vbKeyLButton)
in my Worksheet_SelectionChange, it shows just 0 (zero).



*rips hair out*



Anyone have ideas on how to determine why my sheet doesnt work, but a
blank fresh one does?

-- 
--
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 
To post to this group, send email to excel-macros@googlegroups.com

<><><><><><><><><><><><><><><><><><><><><><>
Like our page on facebook , Just follow below link
http://www.facebook.com/discussexcel


Re: $$Excel-Macros$$ Re: GetAsyncKeyState not working window 7 office 2010 x64

2011-02-09 Thread rcamarda
Sorry for the rabbit hole...I posted too quickly and once it was sent,
I couldnt retract.

I still can not get it to work.

Latest I tried is this, which always says left click has been pressed

code:

On a module I have:  Public Declare Function GetAsyncKeyState Lib
"user32" (ByVal vKey As Long) As Integer

(some postings change the return type and the parameter types)

In my sheet I have:
Sub Worksheet_SelectionChange(ByVal Target As Range)
If (GetAsyncKeyState(vbKeyRButton)) Then
MsgBox "You have clicked the right button!" 'when you click right
button

ElseIf (GetAsyncKeyState(vbKeyLButton) ) Then
MsgBox "You have clicked the left button!" 'when you click left button
End If


End Sub

I checked out: 
http://itknowledgeexchange.techtarget.com/beyond-excel/back-to-controlling-the-cursor/
and noticed how the author "cheated" when it came to mouse :)

I've added the &H8000 bit mask, but still nothing on the left mouse
click.

On Feb 9, 3:52 am, ashish koul  wrote:
> hi dave
>
> check this link see if 
> helpshttp://itknowledgeexchange.techtarget.com/beyond-excel/back-to-contro...
>
> On Wed, Feb 9, 2011 at 2:08 PM, Dave Bonallack 
> wrote:
>
>
>
>
>
> > Thanks Ashish,
> > Works great.
> > Regards - Dave.
>
> > ------------------
> > Date: Wed, 9 Feb 2011 10:32:26 +0530
>
> > Subject: Re: $$Excel-Macros$$ Re: GetAsyncKeyState not working window 7
> > office 2010 x64
> > From: koul.ash...@gmail.com
> > To: excel-macros@googlegroups.com
>
> > try this
>
> > On Wed, Feb 9, 2011 at 10:27 AM, ashish koul wrote:
>
> > @ dave Try this
>
> >  Wed, Feb 9, 2011 at 9:55 AM, Dave Bonallack 
> > wrote:
>
> > Hi Ashish,
> > Thanks for sending the file. Excellent. But for some reason, selecting a
> > cell with the left mouse button isn't recognised. I tried adding Rob's code,
> > but it didn't work properly either. It only worked when using the left mouse
> > button to 'OK' a previous message box.
> > Regards - Dave
>
> > --
> > Date: Wed, 9 Feb 2011 09:03:03 +0530
> > Subject: Re: $$Excel-Macros$$ Re: GetAsyncKeyState not working window 7
> > office 2010 x64
> > From: koul.ash...@gmail.com
>
> > To: excel-macros@googlegroups.com
>
> > hi dave,
>
> > see if this helps
>
> > On Wed, Feb 9, 2011 at 5:52 AM, Dave Bonallack 
> > wrote:
>
> > Hi Rob,
> > I am interested in the trapping of a left mouse click, but couldn't
> > understand it from your posts. Could you please attach a workbook
> > with working code?
> > Regards - Dave.
>
> > > Date: Tue, 8 Feb 2011 05:14:53 -0800
> > > Subject: $$Excel-Macros$$ Re: GetAsyncKeyState not working window 7
> > office 2010 x64
> > > From: robert.a.cama...@gmail.com
> > > To: excel-macros@googlegroups.com
>
> > > solved it:
> > > I had to add a bit mask (i think thats what its called).
>
> > > This returned true when I clicked on a cell:
>
> > > If CBool(GetAsyncKeyState(1) & 128) Then
> > > MsgBox ("left click trapped")
> > > End If
>
> > > (1) is the constant for left mouse click
>
> > > On Feb 7, 11:28 am, rcamarda  wrote:
> > > > Hi,
> > > > I am trying to trap a left mouse click. I found lots of uses of
> > > > GetAsyncKeyState, however, even something simple is not working.
>
> > > > Private Declare Function GetAsyncKeyState Lib "user32.dll" (ByVal vKey
> > > > As Long) As Integer
>
> > > > Private Sub Worksheet_SelectionChange(ByVal Target As Range)
>
> > > > If GetAsyncKeyState(VK_LBUTTON) Then
> > > >     MsgBox ("left click trapped")
> > > > End If
>
> > > > If GetAsyncKeyState(VK_BACK) Then
> > > >     MsgBox ("back space")
> > > > End If
>
> > > > If GetAsyncKeyState(VK_RETURN) Then
> > > >     MsgBox ("enter key")
> > > > End If
>
> > > > End Sub
>
> > > > Should I use a different library when using x64 or Office 2010??
> > > > TIA
> > > > Rob
>
> > > --
>
> > ---­---
> > > Some important links for excel users:
> > > 1. Follow us on TWITTER for tips tricks and links :
> >http://twitter.com/exceldailytip
> > > 2. Join our LinkedIN group @http://www.linkedin.com/groups?gid=1871310
> > > 3. Ex

Re: $$Excel-Macros$$ Re: GetAsyncKeyState not working window 7 office 2010 x64

2011-02-09 Thread ashish koul
hi dave

check this link see if helps
http://itknowledgeexchange.techtarget.com/beyond-excel/back-to-controlling-the-cursor/

On Wed, Feb 9, 2011 at 2:08 PM, Dave Bonallack wrote:

> Thanks Ashish,
> Works great.
> Regards - Dave.
>
> --
> Date: Wed, 9 Feb 2011 10:32:26 +0530
>
> Subject: Re: $$Excel-Macros$$ Re: GetAsyncKeyState not working window 7
> office 2010 x64
> From: koul.ash...@gmail.com
> To: excel-macros@googlegroups.com
>
> try this
>
> On Wed, Feb 9, 2011 at 10:27 AM, ashish koul wrote:
>
>
> @ dave Try this
>
>
>
>
>  Wed, Feb 9, 2011 at 9:55 AM, Dave Bonallack wrote:
>
> Hi Ashish,
> Thanks for sending the file. Excellent. But for some reason, selecting a
> cell with the left mouse button isn't recognised. I tried adding Rob's code,
> but it didn't work properly either. It only worked when using the left mouse
> button to 'OK' a previous message box.
> Regards - Dave
>
> ------------------
> Date: Wed, 9 Feb 2011 09:03:03 +0530
> Subject: Re: $$Excel-Macros$$ Re: GetAsyncKeyState not working window 7
> office 2010 x64
> From: koul.ash...@gmail.com
>
> To: excel-macros@googlegroups.com
>
> hi dave,
>
> see if this helps
>
> On Wed, Feb 9, 2011 at 5:52 AM, Dave Bonallack 
> wrote:
>
> Hi Rob,
> I am interested in the trapping of a left mouse click, but couldn't
> understand it from your posts. Could you please attach a workbook
> with working code?
> Regards - Dave.
>
> > Date: Tue, 8 Feb 2011 05:14:53 -0800
> > Subject: $$Excel-Macros$$ Re: GetAsyncKeyState not working window 7
> office 2010 x64
> > From: robert.a.cama...@gmail.com
> > To: excel-macros@googlegroups.com
>
> >
> > solved it:
> > I had to add a bit mask (i think thats what its called).
> >
> > This returned true when I clicked on a cell:
> >
> > If CBool(GetAsyncKeyState(1) & 128) Then
> > MsgBox ("left click trapped")
> > End If
> >
> > (1) is the constant for left mouse click
> >
> > On Feb 7, 11:28 am, rcamarda  wrote:
> > > Hi,
> > > I am trying to trap a left mouse click. I found lots of uses of
> > > GetAsyncKeyState, however, even something simple is not working.
> > >
> > > Private Declare Function GetAsyncKeyState Lib "user32.dll" (ByVal vKey
> > > As Long) As Integer
> > >
> > > Private Sub Worksheet_SelectionChange(ByVal Target As Range)
> > >
> > > If GetAsyncKeyState(VK_LBUTTON) Then
> > > MsgBox ("left click trapped")
> > > End If
> > >
> > > If GetAsyncKeyState(VK_BACK) Then
> > > MsgBox ("back space")
> > > End If
> > >
> > > If GetAsyncKeyState(VK_RETURN) Then
> > > MsgBox ("enter key")
> > > End If
> > >
> > > End Sub
> > >
> > > Should I use a different library when using x64 or Office 2010??
> > > TIA
> > > Rob
> >
> > --
> >
> --
> > Some important links for excel users:
> > 1. Follow us on TWITTER for tips tricks and links :
> http://twitter.com/exceldailytip
> > 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
> > 3. Excel tutorials at http://www.excel-macros.blogspot.com
> > 4. Learn VBA Macros at http://www.quickvba.blogspot.com
> > 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
> >
> > To post to this group, send email to excel-macros@googlegroups.com
> >
> > <><><><><><><><><><><><><><><><><><><><><><>
> > Like our page on facebook , Just follow below link
> > http://www.facebook.com/discussexcel
>
> --
>
> --
> Some important links for excel users:
> 1. Follow us on TWITTER for tips tricks and links :
> http://twitter.com/exceldailytip
> 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
> 3. Excel tutorials at http://www.excel-macros.blogspot.com
> 4. Learn VBA Macros at http://www.quickvba.blogspot.com
> 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
>
> To post to this group, send email to excel-macros@googlegroups.com
>
> <><><><><><><><><><><><><><><&

RE: $$Excel-Macros$$ Re: GetAsyncKeyState not working window 7 office 2010 x64

2011-02-09 Thread Dave Bonallack

Thanks Ashish,
Works great.
Regards - Dave.
 


Date: Wed, 9 Feb 2011 10:32:26 +0530
Subject: Re: $$Excel-Macros$$ Re: GetAsyncKeyState not working window 7 office 
2010 x64
From: koul.ash...@gmail.com
To: excel-macros@googlegroups.com

try this 


On Wed, Feb 9, 2011 at 10:27 AM, ashish koul  wrote:



@ dave Try this 



 
 
 
 
 Wed, Feb 9, 2011 at 9:55 AM, Dave Bonallack  wrote:


Hi Ashish,
Thanks for sending the file. Excellent. But for some reason, selecting a cell 
with the left mouse button isn't recognised. I tried adding Rob's code, but it 
didn't work properly either. It only worked when using the left mouse button to 
'OK' a previous message box.
Regards - Dave
 


Date: Wed, 9 Feb 2011 09:03:03 +0530
Subject: Re: $$Excel-Macros$$ Re: GetAsyncKeyState not working window 7 office 
2010 x64
From: koul.ash...@gmail.com 



To: excel-macros@googlegroups.com


hi dave,
 
see if this helps 


On Wed, Feb 9, 2011 at 5:52 AM, Dave Bonallack  
wrote:


Hi Rob,
I am interested in the trapping of a left mouse click, but couldn't understand 
it from your posts. Could you please attach a workbook with working code?
Regards - Dave.
 
> Date: Tue, 8 Feb 2011 05:14:53 -0800
> Subject: $$Excel-Macros$$ Re: GetAsyncKeyState not working window 7 office 
> 2010 x64
> From: robert.a.cama...@gmail.com
> To: excel-macros@googlegroups.com 



> 
> solved it:
> I had to add a bit mask (i think thats what its called).
> 
> This returned true when I clicked on a cell:
> 
> If CBool(GetAsyncKeyState(1) & 128) Then
> MsgBox ("left click trapped")
> End If
> 
> (1) is the constant for left mouse click
> 
> On Feb 7, 11:28 am, rcamarda  wrote:
> > Hi,
> > I am trying to trap a left mouse click. I found lots of uses of
> > GetAsyncKeyState, however, even something simple is not working.
> >
> > Private Declare Function GetAsyncKeyState Lib "user32.dll" (ByVal vKey
> > As Long) As Integer
> >
> > Private Sub Worksheet_SelectionChange(ByVal Target As Range)
> >
> > If GetAsyncKeyState(VK_LBUTTON) Then
> > MsgBox ("left click trapped")
> > End If
> >
> > If GetAsyncKeyState(VK_BACK) Then
> > MsgBox ("back space")
> > End If
> >
> > If GetAsyncKeyState(VK_RETURN) Then
> > MsgBox ("enter key")
> > End If
> >
> > End Sub
> >
> > Should I use a different library when using x64 or Office 2010??
> > TIA
> > Rob
> 
> -- 
> --
> Some important links for excel users:
> 1. Follow us on TWITTER for tips tricks and links : 
> http://twitter.com/exceldailytip
> 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
> 3. Excel tutorials at http://www.excel-macros.blogspot.com
> 4. Learn VBA Macros at http://www.quickvba.blogspot.com
> 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
> 
> To post to this group, send email to excel-macros@googlegroups.com
> 
> <><><><><><><><><><><><><><><><><><><><><><>
> Like our page on facebook , Just follow below link
> http://www.facebook.com/discussexcel




-- 
--
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com

To post to this group, send email to excel-macros@googlegroups.com
 
<><><><><><><><><><><><><><><><><><><><><><>
Like our page on facebook , Just follow below link
http://www.facebook.com/discussexcel


-- 

Regards
 
Ashish Koul
akoul.blogspot.com
akoul.wordpress.com
My Linkedin Profile
 
P Before printing, think about the environment.
 

-- 
--
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com

To post to this group, send email to excel-macros@googlegroups.com
 
<><&

Re: $$Excel-Macros$$ Re: GetAsyncKeyState not working window 7 office 2010 x64

2011-02-08 Thread ashish koul
@ dave Try this
ElseIf GetAsyncKeyState(vbKeyLButton) = 1 And &H8000 Then




 Wed, Feb 9, 2011 at 9:55 AM, Dave Bonallack wrote:

> Hi Ashish,
> Thanks for sending the file. Excellent. But for some reason, selecting a
> cell with the left mouse button isn't recognised. I tried adding Rob's code,
> but it didn't work properly either. It only worked when using the left mouse
> button to 'OK' a previous message box.
> Regards - Dave
>
> --
> Date: Wed, 9 Feb 2011 09:03:03 +0530
> Subject: Re: $$Excel-Macros$$ Re: GetAsyncKeyState not working window 7
> office 2010 x64
> From: koul.ash...@gmail.com
>
> To: excel-macros@googlegroups.com
>
> hi dave,
>
> see if this helps
>
> On Wed, Feb 9, 2011 at 5:52 AM, Dave Bonallack 
> wrote:
>
> Hi Rob,
> I am interested in the trapping of a left mouse click, but couldn't
> understand it from your posts. Could you please attach a workbook
> with working code?
> Regards - Dave.
>
> > Date: Tue, 8 Feb 2011 05:14:53 -0800
> > Subject: $$Excel-Macros$$ Re: GetAsyncKeyState not working window 7
> office 2010 x64
> > From: robert.a.cama...@gmail.com
> > To: excel-macros@googlegroups.com
>
> >
> > solved it:
> > I had to add a bit mask (i think thats what its called).
> >
> > This returned true when I clicked on a cell:
> >
> > If CBool(GetAsyncKeyState(1) & 128) Then
> > MsgBox ("left click trapped")
> > End If
> >
> > (1) is the constant for left mouse click
> >
> > On Feb 7, 11:28 am, rcamarda  wrote:
> > > Hi,
> > > I am trying to trap a left mouse click. I found lots of uses of
> > > GetAsyncKeyState, however, even something simple is not working.
> > >
> > > Private Declare Function GetAsyncKeyState Lib "user32.dll" (ByVal vKey
> > > As Long) As Integer
> > >
> > > Private Sub Worksheet_SelectionChange(ByVal Target As Range)
> > >
> > > If GetAsyncKeyState(VK_LBUTTON) Then
> > > MsgBox ("left click trapped")
> > > End If
> > >
> > > If GetAsyncKeyState(VK_BACK) Then
> > > MsgBox ("back space")
> > > End If
> > >
> > > If GetAsyncKeyState(VK_RETURN) Then
> > > MsgBox ("enter key")
> > > End If
> > >
> > > End Sub
> > >
> > > Should I use a different library when using x64 or Office 2010??
> > > TIA
> > > Rob
> >
> > --
> >
> --
> > Some important links for excel users:
> > 1. Follow us on TWITTER for tips tricks and links :
> http://twitter.com/exceldailytip
> > 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
> > 3. Excel tutorials at http://www.excel-macros.blogspot.com
> > 4. Learn VBA Macros at http://www.quickvba.blogspot.com
> > 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
> >
> > To post to this group, send email to excel-macros@googlegroups.com
> >
> > <><><><><><><><><><><><><><><><><><><><><><>
> > Like our page on facebook , Just follow below link
> > http://www.facebook.com/discussexcel
>
> --
>
> --
> Some important links for excel users:
> 1. Follow us on TWITTER for tips tricks and links :
> http://twitter.com/exceldailytip
> 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
> 3. Excel tutorials at http://www.excel-macros.blogspot.com
> 4. Learn VBA Macros at http://www.quickvba.blogspot.com
> 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
>
> To post to this group, send email to excel-macros@googlegroups.com
>
> <><><><><><><><><><><><><><><><><><><><><><>
> Like our page on facebook , Just follow below link
> http://www.facebook.com/discussexcel
>
>
>
>
> --
> *Regards*
> * *
> *Ashish Koul*
> *akoul*.*blogspot*.com <http://akoul.blogspot.com/>
> *akoul*.wordpress.com <http://akoul.wordpress.com/>
> My Linkedin Profile <http://in.linkedin.com/pub/ashish-koul/10/400/830>
>
> P Before printing, think about the environment.
>
>
>
> --
>
> 

RE: $$Excel-Macros$$ Re: GetAsyncKeyState not working window 7 office 2010 x64

2011-02-08 Thread Dave Bonallack

Hi Ashish,
Thanks for sending the file. Excellent. But for some reason, selecting a cell 
with the left mouse button isn't recognised. I tried adding Rob's code, but it 
didn't work properly either. It only worked when using the left mouse button to 
'OK' a previous message box.
Regards - Dave
 


Date: Wed, 9 Feb 2011 09:03:03 +0530
Subject: Re: $$Excel-Macros$$ Re: GetAsyncKeyState not working window 7 office 
2010 x64
From: koul.ash...@gmail.com
To: excel-macros@googlegroups.com


hi dave,
 
see if this helps 


On Wed, Feb 9, 2011 at 5:52 AM, Dave Bonallack  
wrote:


Hi Rob,
I am interested in the trapping of a left mouse click, but couldn't understand 
it from your posts. Could you please attach a workbook with working code?
Regards - Dave.
 
> Date: Tue, 8 Feb 2011 05:14:53 -0800
> Subject: $$Excel-Macros$$ Re: GetAsyncKeyState not working window 7 office 
> 2010 x64
> From: robert.a.cama...@gmail.com
> To: excel-macros@googlegroups.com 



> 
> solved it:
> I had to add a bit mask (i think thats what its called).
> 
> This returned true when I clicked on a cell:
> 
> If CBool(GetAsyncKeyState(1) & 128) Then
> MsgBox ("left click trapped")
> End If
> 
> (1) is the constant for left mouse click
> 
> On Feb 7, 11:28 am, rcamarda  wrote:
> > Hi,
> > I am trying to trap a left mouse click. I found lots of uses of
> > GetAsyncKeyState, however, even something simple is not working.
> >
> > Private Declare Function GetAsyncKeyState Lib "user32.dll" (ByVal vKey
> > As Long) As Integer
> >
> > Private Sub Worksheet_SelectionChange(ByVal Target As Range)
> >
> > If GetAsyncKeyState(VK_LBUTTON) Then
> > MsgBox ("left click trapped")
> > End If
> >
> > If GetAsyncKeyState(VK_BACK) Then
> > MsgBox ("back space")
> > End If
> >
> > If GetAsyncKeyState(VK_RETURN) Then
> > MsgBox ("enter key")
> > End If
> >
> > End Sub
> >
> > Should I use a different library when using x64 or Office 2010??
> > TIA
> > Rob
> 
> -- 
> --
> Some important links for excel users:
> 1. Follow us on TWITTER for tips tricks and links : 
> http://twitter.com/exceldailytip
> 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
> 3. Excel tutorials at http://www.excel-macros.blogspot.com
> 4. Learn VBA Macros at http://www.quickvba.blogspot.com
> 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
> 
> To post to this group, send email to excel-macros@googlegroups.com
> 
> <><><><><><><><><><><><><><><><><><><><><><>
> Like our page on facebook , Just follow below link
> http://www.facebook.com/discussexcel




-- 
--
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com

To post to this group, send email to excel-macros@googlegroups.com
 
<><><><><><><><><><><><><><><><><><><><><><>
Like our page on facebook , Just follow below link
http://www.facebook.com/discussexcel


-- 

Regards
 
Ashish Koul
akoul.blogspot.com
akoul.wordpress.com
My Linkedin Profile
 

P Before printing, think about the environment. 

-- 
--
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com

To post to this group, send email to excel-macros@googlegroups.com
 
<><><><><><><><><><><><><><><><><><><><><><>
Like our page on facebook , Just follow below link
http://www.facebook.com/discussexcel
  

-- 
--
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 
To post to this group, send email to excel-macros@googlegroups.com

<><><><><><><><><><><><><><><><><><><><><><>
Like our page on facebook , Just follow below link
http://www.facebook.com/discussexcel


RE: $$Excel-Macros$$ Re: GetAsyncKeyState not working window 7 office 2010 x64

2011-02-08 Thread Dave Bonallack

Hi Rob,
I am interested in the trapping of a left mouse click, but couldn't understand 
it from your posts. Could you please attach a workbook with working code?
Regards - Dave.
 
> Date: Tue, 8 Feb 2011 05:14:53 -0800
> Subject: $$Excel-Macros$$ Re: GetAsyncKeyState not working window 7 office 
> 2010 x64
> From: robert.a.cama...@gmail.com
> To: excel-macros@googlegroups.com
> 
> solved it:
> I had to add a bit mask (i think thats what its called).
> 
> This returned true when I clicked on a cell:
> 
> If CBool(GetAsyncKeyState(1) & 128) Then
> MsgBox ("left click trapped")
> End If
> 
> (1) is the constant for left mouse click
> 
> On Feb 7, 11:28 am, rcamarda  wrote:
> > Hi,
> > I am trying to trap a left mouse click. I found lots of uses of
> > GetAsyncKeyState, however, even something simple is not working.
> >
> > Private Declare Function GetAsyncKeyState Lib "user32.dll" (ByVal vKey
> > As Long) As Integer
> >
> > Private Sub Worksheet_SelectionChange(ByVal Target As Range)
> >
> > If GetAsyncKeyState(VK_LBUTTON) Then
> > MsgBox ("left click trapped")
> > End If
> >
> > If GetAsyncKeyState(VK_BACK) Then
> > MsgBox ("back space")
> > End If
> >
> > If GetAsyncKeyState(VK_RETURN) Then
> > MsgBox ("enter key")
> > End If
> >
> > End Sub
> >
> > Should I use a different library when using x64 or Office 2010??
> > TIA
> > Rob
> 
> -- 
> --
> Some important links for excel users:
> 1. Follow us on TWITTER for tips tricks and links : 
> http://twitter.com/exceldailytip
> 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
> 3. Excel tutorials at http://www.excel-macros.blogspot.com
> 4. Learn VBA Macros at http://www.quickvba.blogspot.com
> 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
> 
> To post to this group, send email to excel-macros@googlegroups.com
> 
> <><><><><><><><><><><><><><><><><><><><><><>
> Like our page on facebook , Just follow below link
> http://www.facebook.com/discussexcel
  

-- 
--
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 
To post to this group, send email to excel-macros@googlegroups.com

<><><><><><><><><><><><><><><><><><><><><><>
Like our page on facebook , Just follow below link
http://www.facebook.com/discussexcel