Making a Timeline/Linking Label Text to MsgBox - excel

I am creating a timeline in Excel. For each date, I could have one or more event happen. Displaying the entire text of each event above the data point will be crowded. I will have short descriptions above each data point. I want to click the label text or data point and have a message box appear with the information associated with that event.
I have a timeline template already and I have the values set up. I don't want to manually create transparent command buttons behind each event. Is there a way to have VBA automatically border or create a shape behind each data point or data label and have it be a button that displays a message box? Even better yet, is there a simpler way of doing this process than I have been thinking about it?
Thank you so much!
Jaxon

Related

Visual Basic for Applications Animated text

when I open my excel, macro command run automatically and show "welome".But i want to design it little bit.Is there any way i can change its colour size or text box. below my screen shot. [Its not utmost important but I love to know can i animated this text.]
IMAGE LINK
https://msexcel-analysistabs1.netdna-ssl.com/wp/wp-content/uploads/2013/01/run-a-macro-automatically.png
Are you just calling a standard msgbox in VBA? If so, instead of calling a msgbox, you can create an actual UserForm in Excel VBA. From there, place a label in the "box" and you can format the font in a variety of ways: colors, size, text font, etc.
You cannot do any "fun" animations as far as I know. But you can definitely change the font size and color!
Here is an example (I'm not the most creative person)
You do this under the VBA Project Explorer -> Insert -> Userform. From there you add Labels/Buttons/Whatever objects you would like, and resize the form if you so choose. Then in your module/macro, you call this form instead of using a msgbox.
As far as changing the color and size of the text, Yes, you need to create a UserForm and create the 'Welcome' screen as a custom form instead of using VBA's msgbox.
In VBA, right click on the workbook in the Project Explorer.
Select Insert->UserForm.
Design how you'd like the Welcome screen to display.
In ThisWorkbook's Workbook_Open() sub, put UserForm.Show() to display the custom welcome message when the workbook first opens.
As far as animating said text, Not really. There are some convoluted workarounds using an embedded webbrowser object in order to render a custom animated text javascript file. It is full of 'Potential Risk' notifications for the user and really doesn't look very good. Sorry to burst your bubble :).

vba-excel click event triggered during initialize when load data into a text box

I am using VBA Excel. I am formatting data from several sources to display in a text box (as a quick summary), when the user clicks on this text box I have another userform that will display to edit this data. When I move the data into the text box during initialize the click event triggers. Is there a way to turn off the event during initialize then turn it back on? This does not happen if I have the user do the double click, however I would like it to be a single click if possible for consistency with the rest of the maintenance screens.
If the click event triggers then you must be using the wrong event make sure that the event handler does not look like this TextBox1_Change() if so change the event to DblClick

Dynamically change chart after clicking an icon in Excel

I am doing a dashboard. To resolve the problem with the space, I would like to show a chart which changes depending of which icon an user clicks (see image in following link: http://screencast.com/t/IvzllhxCi).
Charts are already done and ranges defined. The chart showed in the dashboard was inserted using the "Paste picture link" function (sorry if this is not the correct name, but I use Excel in spanish). I assume, that the best way to do it is creating different macros which define the data of a chart and are fired which every icon click, but... is there a more efficient way to do it?
How about just creating all the charts, putting them on top of each other and then showing / hidding the appropriate chart when a user clicks the icons via:
chart.Visible = xlSheetHidden;
And
chart.Visible = xlSheetVisible;

How to add Listpicker to textbox in LiveCode

I want to add a list picker in Live code.When a user click on the Textbox the list picker should open with list of items.How can do that?
Be aware that your text field must be locked in order to send a "mouseUp" message, if that is how you want to show the combo box that Monte suggested. There are other ways around this, if you still want to be able to type into that field. Write back with your exact needs.
The combo box is useful because you can type right into it. If you only want options that will load data into an existing field, a popup or pulldown might be something to look into.
On the left side of the tool palette about the middle is a style of button called a combo box. I think that's what you want.

Excel ActiveX labels blink / change style upon clicking

This, what seems to be a glitch, has annoyed me for years. Some ActiveX controls, when placed on the worksheet, do odd things when clicked. In the picture below, there is no code whatsoever and Label1 is disabled, but when Label1 is clicked, Label2 disappears. I've also seen dark labels turn white upon clicking. The only way I know of to prevent this would be to use subclassing/hooking to intercept and cancel wm_mousedown messages when over the label but that is a ton of work for such a simple goal. Does anybody out there have a simple solution for this?
*Edit: I believe what's happening is the z-order/z-index brings the clicked control to the top. But if there's a way to prevent this I would love to know how.
Here is an example of the background color changing when a label is clicked. See the label with the caption "Original Value:"
Items should stay in the order they were laid out in, I have many projects with overlapping menus, shapes and labels and they all stay in the layer order they are organised in, the only time they move is if you programatically recreate them to update menues etc, then you need to write code to put them all back in order starting from the bottom up. If they are not staying in order then there is a problem and not a design flaw.

Resources