Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsVB SyntaxEnterprise DevelopmentDatabase AccessControlsCOMWin APICrystal ReportDeploymentGeneralGeneral 2
Related Topics
VB.NET / ASP.NETMS SQL ServerMS AccessOther Database ProductsMore Topics ...

VB Forum / Controls / June 2008



Tip: Looking for answers? Try searching our database.

Where is vbLeftButton defined?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Dudely - 01 Jun 2008 02:18 GMT
I'm trying to use VBA 6, under Excel 2000 to simulate mouse clicks and
keypresses.  I found some code to simulate the mouse clicks, but it
references vbLeftButton, yet doesn't define it anywhere.

After much searching, it would appear to be in MSVBVM60.DLL according
to someone who "sort of" answered the question 4 years ago.  However,
what I really need to know, is what the name of the library is, that I
need to check off in Excel as a reference.

For those of you who want to be helpful but don't know what I'm
talking about in regard to Excel, it's like this...

Fire up Excel.  Hit Alt-F11, that will put you in the VB Editor.
Then, go to Tools->References.  You will see a list of (in my case)
about a thousand checkboxes to choose from.  About maybe 5 are already
checked.  Supposedly, one of those libraries listed there has what I
need.

Anyone know?

Thank you greatly, in advance.  Please email, I'm not a regular here.
I'm simply trying to automate one task and get on with my life.  That
task is to mouse over to a search box on a certain web page, enter
some data into the box, and collect the results back into Excel.  I'm
losing my hair over it.
Norm Cook - 01 Jun 2008 13:41 GMT
> I'm trying to use VBA 6, under Excel 2000 to simulate mouse clicks and
> keypresses.  I found some code to simulate the mouse clicks, but it
[quoted text clipped - 21 lines]
> some data into the box, and collect the results back into Excel.  I'm
> losing my hair over it.

vbLeftButton comes from the VB runtime library msvbm60.dll
which is for standard compiled VB6 (and less)

In VBA, there is acLeftButton and its relatives which come from
the ACCESS library (MSACCx.olb) where x is the version.  Once you
get into the VB Editor, press F2 to launch the Object Browser,
where you will find this & other constants.  Note that these
constants for the mousebutton are the same as the vb versions,
Left, Right, Middle => 1, 2, 4
Jeff Johnson - 02 Jun 2008 14:19 GMT
> After much searching, it would appear to be in MSVBVM60.DLL according
> to someone who "sort of" answered the question 4 years ago.  However,
> what I really need to know, is what the name of the library is, that I
> need to check off in Excel as a reference.

You don't HAVE to know the "friendly name" of a library to reference it. You
can hit the Browse button in the References dialog and search for the actual
file name, which you have already determined above.
Dudely - 04 Jun 2008 20:27 GMT
Thanks for the attempt to help,  I don't think anyone is listening to
what I'm saying.  However, you did give me an idea, which is that I
found the MSVBVM60.DLL file and added it to the library.

Now however I get "Name conflicts with existing module, library or
object module".  And of course it doesn't tell me what I need to know
to identify the conflict.

I took a guess at what it might be and attempted to uncheck its box,
but it won't let me saying that it's in use.  I even started up a
totally blank workbook.  No luck.

Any help?

Thank you in advance.

> > After much searching, it would appear to be in MSVBVM60.DLL according
> > to someone who "sort of" answered the question 4 years ago.  However,
[quoted text clipped - 4 lines]
> can hit the Browse button in the References dialog and search for the actual
> file name, which you have already determined above.
Jeff Johnson - 04 Jun 2008 23:45 GMT
>>> After much searching, it would appear to be in MSVBVM60.DLL according
>>> to someone who "sort of" answered the question 4 years ago. However,
>>> what I really need to know, is what the name of the library is, that I
>>> need to check off in Excel as a reference.

>> You don't HAVE to know the "friendly name" of a library to reference it.
>> You
>> can hit the Browse button in the References dialog and search for the
>> actual
>> file name, which you have already determined above.

> Thanks for the attempt to help,  I don't think anyone is listening to
> what I'm saying.

Uhhh, it sounded like you were saying that you were trying to find the value
of vbLeftButton. To that end you wanted to reference MSVBVM60.DLL so that
you could look up its value in the Object Browser, which Norm suggested. You
believed that you needed to know the name of the library as presented in the
References dialog in order to add it and I told you that you could simply
browse for the file, which you did below:

> However, you did give me an idea, which is that I
> found the MSVBVM60.DLL file and added it to the library.

So how were we not listening?

> Now however I get "Name conflicts with existing module, library or
> object module".  And of course it doesn't tell me what I need to know
> to identify the conflict.

I don't get that error often, but usually when I do the IDE highlights the
line (or the first line of the procedure) which contains the error. Is that
not happening for you? Basically, I believe the error is being caused by
code like this:

   Dim something As Blah

where Blah is a class that exists in multiple libraries. The solution is to
preface the class name with the library name, like this:

   Dim something As VBRUN.Blah
Dudely - 05 Jun 2008 00:58 GMT
Well, close enough.

> Uhhh, it sounded like you were saying that you were trying to find the value
> of vbLeftButton. To that end you wanted to reference MSVBVM60.DLL so that
[quoted text clipped - 7 lines]
>
> So how were we not listening?

Did I say you weren't listening?  I meant I wasn't listening ;)  Or
you somehow changed your messages because I could of sworn I read
something else.  Oh well, I must have been sleep computing again.  :)

> > Now however I get "Name conflicts with existing module, library or
> > object module".  And of course it doesn't tell me what I need to know
> > to identify the conflict.

As I mentioned in the previous message (I did didn't I?  Now you've
got me paranoid), I opened a blank (as in new) workbook.  So there was
no code at all.

Therefore, my interpretation of what it's saying is that the duplicate
definition is in one of the other (standard) (presumably older)
libraries I'm using.  However, there's no way to dis-include the other
libraries.  It will not let me uncheck the boxes.

> I don't get that error often, but usually when I do the IDE highlights the
> line (or the first line of the procedure) which contains the error. Is that
[quoted text clipped - 7 lines]
>
>     Dim something As VBRUN.Blah
Jeff Johnson - 05 Jun 2008 14:32 GMT
> > Now however I get "Name conflicts with existing module, library or
> > object module". And of course it doesn't tell me what I need to know
> > to identify the conflict.

> As I mentioned in the previous message (I did didn't I?  Now you've
> got me paranoid), I opened a blank (as in new) workbook.  So there was
> no code at all.

> Therefore, my interpretation of what it's saying is that the duplicate
> definition is in one of the other (standard) (presumably older)
> libraries I'm using.  However, there's no way to dis-include the other
> libraries.  It will not let me uncheck the boxes.

Okay, walk me through this. Are you getting this error THE MOMENT you open a
blank workbook? Or is it when you open the VBA IDE? Or...?
Dudely - 07 Jun 2008 22:38 GMT
> > > Now however I get "Name conflicts with existing module, library or
> > > object module". And of course it doesn't tell me what I need to know
[quoted text clipped - 9 lines]
> Okay, walk me through this. Are you getting this error THE MOMENT you open a
> blank workbook? Or is it when you open the VBA IDE? Or...?

When I compile.  Open Excel Workbook ==>ALT-F11 to open VB Editor  ==>
Debug ==> Compile ==> Conflict Error Message
Dudely - 08 Jun 2008 01:28 GMT
Actually that's not quite correct.  It's really Open Workbook ==>Alt-
F11==>Tools==>References==>Check new library holding
vbLeftButton==>Debug==>Compile==>Conflict Error.

And yes, even with a blank workbook.  Which is why I say that the
conflict has to be with one of the older "standard" libraries.  Yet,
there are a couple I'm unable to un-include - it gives an error when I
attempt to uncheck it ("Can't remove control or reference; in use")

> When I compile.  Open Excel Workbook ==>ALT-F11 to open VB Editor  ==>
> Debug ==> Compile ==> Conflict Error Message- Hide quoted text -
>
> - Show quoted text -
Dudely - 08 Jun 2008 01:59 GMT
Sorry, wrong again.  I'm not compiling at all.  I simply check the new
library and hit OK.  At that point, I get the Conflict Error.

Prior to that, compiling gives me a "variable not defined" error,
which is of course the reason I need to add in the msvbvm60.dll in the
first place.

Trying to uncheck the old library gives me the "Can't remove control
or reference; in use" error.

I looked around a bit and found: http://www.vbforums.com/showthread.php?t=495893
which is a similar problem, but I don't understand the solution
provided.

Reminder, I'm using Excel 2000 with VBA 6, on WinXP.

Thank you

> Actually that's not quite correct.  It's really Open Workbook ==>Alt-
> F11==>Tools==>References==>Check new library holding
[quoted text clipped - 11 lines]
>
> - Show quoted text -
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2010 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.