[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now



Posted on 2000-04-13
Medium Priority
Last Modified: 2010-05-02
I want to show text in a label.caption whenever the mouse is over a command button on a form.  Is this possible?
Question by:Daron1
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2

Accepted Solution

Gotcha007 earned 160 total points
ID: 2713608
you can use the MouseMove fonction for the command button (Switch to the code windows ,Choose in object listbox your command button and in the function listbox choose mousemove)

when the mouse is on the button this fonction is activated.
and in this fonction you can write a text to your label.

Author Comment

ID: 2713653
Private Sub command1_MouseMove()
Label4.Caption = "label text."
End Sub

I tried this but get a compile error:

"Procedure declaration does not match description of event or procedure having the same name."

Author Comment

ID: 2713790
Adjusted points from 30 to 40
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!


Expert Comment

ID: 2713889
The problem is in your event declaration
its like this.

Private Sub Command1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Label1.Caption = "WHATEVER"
End Sub

Author Comment

ID: 2713987
I guess I need to do the same for the mouseout, right?  This enables the label to be reset to "" or whatever default.

Expert Comment

ID: 2714050
Points are not mine but this is not a website where you can use javascript command mouseout() vb doesn't have that event. What you can do is you can set up a boolean value to see if value has left has changed. Good luck.

Author Comment

ID: 2714227
I got a slight JavaScript habit, sorry about that. :)  Thanks.

Featured Post

What’s Wrong with Your Cloud Strategy ?

Even as many CIOs are embracing a cloud-first strategy, the reality is that moving to the cloud is a lengthy process and the end-state is likely to be a blend of multiple clouds—public and private. Learn why multicloud solutions matter in this webinar by Nimble Storage.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question