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.
Related
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 :).
I have embedded an image to a chart's datalabel. I want to only keep the image and not the value which appears on top of the image.
However I'm not sure how i can get rid of the value to only show the image?
I thought could've set the font colour to transparent but that's not available. I also played around with the number formatter but had no luck?
I'm using Windows/Excel 2010
Thanks
Clicking on one of the data labels once will select all of them, clicking a second time will select only the one you clicked on. Then just hit the delete button. (You should also be able to edit the font/colour in the Home tab.)
Context
I want the user to review some selections they made earlier. So I display some text describing each selection on a separate control in a userform. Some of the text on the controls is long, extending beyond the width of the control. This is fine; I just want the user to be able to see all of the text without being able to edit it. To do this, I use textboxes that are "Locked" (i.e. not editable) but "Enabled" (i.e. selectable). This way, they can just click and either mouse-drag or arrow-key over to scroll through all the text.
Problem
The (small, aesthetic) problem is that when the user clicks in one of the textboxes, they get a blinking cursor, which is misleading as that is normally associated with an editable textbox.
Possible solutions
Ideally, there would be some way of removing the blinking cursor, while still allowing selection but not edition. However, I'm open to other alternatives that don't have to do with changing the width, or having a scrollbar (the textbox is too short to fit a scrollbar). The best alternative I have so far is changing the background color to a gray to make it slightly more clear that it's not editable.
P.S. I'm very familiar with VBA, so if that's part of the solution, I'm cool with that.
Thanks all!
I had a similar issue, and solved it by using these instructions to create a hidden textbox that the cursor automatically appeared in (invisible to the user).
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
I'm creating a dynamic chart using an Excel form control -- the scrollbar -- and the way this works is exactly as described on http://www.excelcharts.com/blog/animation-interaction-and-dynamic-excel-charts/ (towards the bottom). I have a chart of data, and a column called "Chart source" that just does an index match based on the scrollbar's linked number. When you click through the scrollbar, it updates the chart source column and thus the chart.
The problem I'm having is that when I click the scrollbar, it keeps scrolling all the way, to either the left or the right, instead of moving incrementally one by one. The number counts through 1 by 1, but it goes all the way as if I were continuously clicking the button. This behavior stops in its tracks if I click and then move the mouse out of the arrow area. I've tried messing with the form control's "incremental change" and "page change" options to no avail. Things that do work: I can click and drag the scrollbar itself to the place I want it. I can type a new number in the cell linked to the scrollbar, and the scrollbar will jump to the right position.
Does anyone have an idea of how to fix this bug?
EDIT: I figured out the problem. This is a bug in Excel. If you are in "Page Break Preview" mode instead of "Normal" mode, this behavior will happen. Switching back to "Normal" mode (the first of the three icons in the bottom right next to the zoom) fixes this behavior.
This problem occurs when calculations that result from the changed value that is controlled by the scroll bar, takes too long. Changing to Manual calculation mode resolves the problem (although of course is not necessarily desirable in all cases)...
(see http://www.pcreview.co.uk/forums/slider-bar-continues-increment-mouse-hovers-over-arrow-t3064239.html)
The same has been happening to me, but my excel sheet was in "normal" mode.I believe the original answer is correct. I noticed this happens when I press a combination of keys or my hand lightly brushes across bottom pf laptop. Very annoying. Finally I sit and wait for the scrolling to stop then click back to top of sheet.
Possible answer... I have the problem with one type of worksheet, but only when another worksheet with VBA code is open. A fix might be, in the first worksheet:
File\Options\Advanced\Formulas\un-check Enable Multi-Threaded Calculation
I figured out the problem. This is a bug in Excel. If you are in "Page Break Preview" mode instead of "Normal" mode, this behavior will happen. Switching back to "Normal" mode (the first of the three icons in the bottom right next to the zoom)