Secret Techniques in VBA UserForm Design

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
now the last thing that I will just briefly touch on is the use of UI kits so user interface kits we saw the example earlier with that contain all of the images for let's say an iPhone but you can have ones that are formatted for Android phones or iPads or the PlayBook development they are usually in the PSD format so you do need to have a bit of a background in Photoshop well even just opening up and Street take screen captures and then customizing them or yourself using paint will actually work out pretty well so you can see there I got this one application here which is actually roughly equivalent to the size of its well--there's pixel size of that playbook and then on the background here this is actually just another UI set that you can download kind of looks like Tron and things kind of glow you'll find that development these days is actually just this you'll see that the user interfaces are just a collection of images anyway so I'll go back to this form that I have put together you probably can't see the whole thing so I will move it around so that you can there here we go you'll have this file available for download for some of you I have a basic form that I developed in in VBA so here you go I've got this program that I want to build essentially what it's going to look like maybe I'll develop it in Visual C++ maybe it'll be Visual Basic but I've just put it together this prototype in VBA so I can look at pictures and you know that actually does something it didn't a second ago so I click on I click pictures and then get a picture loaded and you notice I just have buttons that don't do anything so I've added a little graphical button for that settings so that's nice but not very engaging it's gray you know I've made it more interesting with this little button here but that's really not the point so we move on to the next step well I want a much more dynamic kind of application to look at so I can do something like this so here I've just got a simple form where the background is an image that came from a UI set that I downloaded for free off the web you do have to check the licensing on these kind of things to make sure they're available for non commercial or non-commercial use whatever you're going to be using for so I've got a couple of things here I can collect on the button and you'll see that these are actually graphics and they're not actual buttons but I did make a couple of things happen here so I can select a file somewhere I can select a file and then when I come back to the screen it would do something different and then I've done this so I click and I could choose one of those that's actually another image so I'll show you a little technique that I use here here's settings I click on the Settings button and it displays another list this entire menu is another graphic element so this is entirely all one graphic which means I can't actually click on the other items but it gives you a good idea for what the application would do so I do want to make this video short which is of course not as short as I wanted it to be but just the last little look here this is of course what I had created the background is an images in itself and what I actually have even though that's a background picture on top of it I've placed a label and since I can execute code associated with any of these labels they're just transparent labels that fit over top there you go box style equals transparent usually they're opaque and they look like that and of course I could change their color and make it look like that or like that all those are border color so doesn't really matter back color there you can see them but I actually want to make them transparent anyway so those are that's how that works and I double click on open and here's the code to open the particular file when I go back to my form now this is a little special technique here this you can actually see the label there's a label here and this is layered on top of this picture which is actually an image that I'll just move out of the way because it's sitting on top of another picture so actually that's part of the background too so even I can pick up this label and I will change its color because it does get hard to find oops no because it's transparent there we go I just move it out of the way okay so that button it's not a button that's just the background picture again go back into the form and I just placed the label on top of it it's like a hotspot that's what the user will click on in web terminology and then this image is just play in the right position that I want it to appear when I'm done with it I had to do some fine-tuning by changing the positioning using the left and top position of that image because I will show you also for this particular image it is not visible when the program runs so I actually change visible it's visible it's false so that when I execute this form and you can't see it and when I click on it it becomes visible and I click on that little region and it becomes visible and you can see there's kind of a it actually moves to the right a little bit and that's why I had to hide that because if I to make this transparent again then I run it then you can actually see the button move and I didn't like that idea so I did have to tweak it a little bit and that's all I wanted to say so the file will be provided for you if you're taking CP 212 and you'll know how to get access to that file so thank you very much for your time and I hope you had a great semester
Info
Channel: RickHendersonTV
Views: 67,112
Rating: 4.793313 out of 5
Keywords: vba, cp212, excel, excel 2010, excel 2007
Id: rmUWeR4Pxic
Channel Id: undefined
Length: 5min 30sec (330 seconds)
Published: Mon Jul 30 2012
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.