Hi Dan.. cool trick. You can also set the button height or width to 0 and it will not appear when the form loads. The disadvantage there is that you can't see it in design mode and have to remember to use the drop down from the properties window if you want to select it and make any changes. I've also used the trick of putting it under one of the other objects on the form, like another button or label. I like your idea of putting it under an empty label, since it at least gives you a visual cue in design mode to remind yourself that you hid the button under it. If you set the Visible property to False, it will not appear when you run the form, but sadly the accelerator key won't work if Visible is False. Thanks for the great User Form tips.. always learn something new and fun at your channel :)) Thumbs up!!
@ExcelVbaIsFun4 жыл бұрын
Thanks Wayne. I always love reading your comments! Yes, those are definitely familiar steps!👍
@eCabinetstipsandtricks4 жыл бұрын
Thanks, Dan. I use hidden labels to get the row and/ or column numbers to use when working with list boxes. While I have your attention, is it possible to enable the minimize button on a user form that would allow the user to click it and minimize the form itself to the taskbar?
@ExcelVbaIsFun4 жыл бұрын
Yes, this is possible, but only with WinApi commands, which can get complicated and can crash Excel if something goes wrong. I'm working up a course for Advanced Userforms so people can more easily do that and much more. I'll keep you posted, my friend! Thanks Dan
@sridharkrishnappanavanerth33884 жыл бұрын
Sir, i am working on a inventory project, i am using multi page control with 3 pages for Sales,Purchase and inventory respectively. i want to display 3 list box one each for all the three pages.when i shift from one page to other then my lists boxes should update accordingly. please demonstrate this in a video. thanks
@mr.write1433 Жыл бұрын
escape on button but not in the userform ?
@thomasfergusen51444 жыл бұрын
hello, i have choosed true option of tabstop property of a label control but when i pressed tab after run, it didnt work. then i closed userform and checked the tabstop property of the label guess what? it has been returned to false... i was suprised. can you explain the reason of why please, thanks for one more of benefit tips God Bless!
@ExcelVbaIsFun4 жыл бұрын
Hi thomas, It seems labels have no ability to get focus, therefore they cannot receive focus with the Tab key. I think this was added to labels as an accident or oversight. Please see this Microsoft article where it says "Remarks: The TabStop property is not relevant for the Label class, so setting TabStop to true has no effect." docs.microsoft.com/en-us/dotnet/api/system.windows.forms.label.tabstop?view=netcore-3.1 Thanks Dan
@thomasfergusen51444 жыл бұрын
@@ExcelVbaIsFun i see, thank you very much!
@BogdanDonescu4 жыл бұрын
Hello! Actually you don't need to cover the button or get it out of sight, you just need to make one of its dimensions (height or width) zero. HTH.
@ExcelVbaIsFun4 жыл бұрын
Hi Bogdan, You're absolutely correct, of course. I only prefer this as Wayne commented because it's easier to select items you can visualize in design mode and that are easy to find, remember and select. But this is largely a preference thing. Thanks so much for the ideas and comments. I love it! 👍
@kristjanminnatharmet89614 жыл бұрын
or just add a macro shortcut from macro options
@ExcelVbaIsFun4 жыл бұрын
Hi Kris, That should work, but only if the Userform was opened modelessly. If the Userform is opened regularly, it takes precedence and will block regular macro keyboard shortcuts, since Excel is no longer listening and the Userform is listening. Thanks for the comment!! Dan