Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
trying my first user form.....
Hi all.
After tinkering for a long while with macros-- mostly with help from many of you-- I've decided to try my hand at user forms. Some of the macros I have have multiple input boxes, and I'd like to reduce the amount of them, and have all the input on a single form. I've made the forms using the drag/drop toolbox, and now have to figure out what's next? I've found where I can change the names of the components in the property box, and that will allow me to "link" the variable names I've given to my macro elements. myRng_n, myCell_n, etc...... where _n is the number/letter I've assigned to the given variable. But after that.... I'm lost. And yes, I'll admit part of this is somewhat intimidating, but since I've come this far, I have found I'm willing to let go of that, and move forward...... My questions are-- trying not to be too general, yet general enough to get the info I need-- what do I do next? 1- do I place the code elements for my variables within the sub for each inputbox (of the same name) of the form? I.e., how do I link the macro input demands to the form inputs? 2- how do I activate/cancel the form? From what I've tried thus far, it seems that I need to place the entire sub (for my macro) within the cmd_click_ok sub. Is there some basic code that activates the macro with that button? Similarly, is there some code that cancels when I click cancel? 3- ultimately, my goal will be to take some old C++ code that I've written, and make a windows program out of it using forms, etc.... (I took a C++ class 7-1/2 years ago, and we got to the very beginning of functions/classes. On my own, I began tinkering with forms, but never got far enough to understand what I was doing, and have found that it's now limiting my abilities in programming, and moving forward.). If this is going to be too complicated to explain here, please direct me to some good tutorials that will explain it more succinctly. Thank you. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
trying my first user form.....
Look he
http://www.contextures.com/xlUserForm01.html "SteveDB1" wrote: Hi all. After tinkering for a long while with macros-- mostly with help from many of you-- I've decided to try my hand at user forms. Some of the macros I have have multiple input boxes, and I'd like to reduce the amount of them, and have all the input on a single form. I've made the forms using the drag/drop toolbox, and now have to figure out what's next? I've found where I can change the names of the components in the property box, and that will allow me to "link" the variable names I've given to my macro elements. myRng_n, myCell_n, etc...... where _n is the number/letter I've assigned to the given variable. But after that.... I'm lost. And yes, I'll admit part of this is somewhat intimidating, but since I've come this far, I have found I'm willing to let go of that, and move forward...... My questions are-- trying not to be too general, yet general enough to get the info I need-- what do I do next? 1- do I place the code elements for my variables within the sub for each inputbox (of the same name) of the form? I.e., how do I link the macro input demands to the form inputs? 2- how do I activate/cancel the form? From what I've tried thus far, it seems that I need to place the entire sub (for my macro) within the cmd_click_ok sub. Is there some basic code that activates the macro with that button? Similarly, is there some code that cancels when I click cancel? 3- ultimately, my goal will be to take some old C++ code that I've written, and make a windows program out of it using forms, etc.... (I took a C++ class 7-1/2 years ago, and we got to the very beginning of functions/classes. On my own, I began tinkering with forms, but never got far enough to understand what I was doing, and have found that it's now limiting my abilities in programming, and moving forward.). If this is going to be too complicated to explain here, please direct me to some good tutorials that will explain it more succinctly. Thank you. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
trying my first user form.....
Take a look at this:
http://www.mrexcel.com/tip009.shtml This is good too: http://www.fontstuff.com/greenwich/f...sUserForms.pdf I remember when I first started learning about UserForms. They are kind of difficult to deal with (well, at least that's how I felt), and somewhat complex too. However, with complexity comes power. You can do many, many, many things with UserForms that you can't do without them. So, spend some time getting to know the ins and outs of the UserForm and a whole new world of possibilites will open up for you. Regards, Ryan---- -- RyGuy "JLGWhiz" wrote: Look he http://www.contextures.com/xlUserForm01.html "SteveDB1" wrote: Hi all. After tinkering for a long while with macros-- mostly with help from many of you-- I've decided to try my hand at user forms. Some of the macros I have have multiple input boxes, and I'd like to reduce the amount of them, and have all the input on a single form. I've made the forms using the drag/drop toolbox, and now have to figure out what's next? I've found where I can change the names of the components in the property box, and that will allow me to "link" the variable names I've given to my macro elements. myRng_n, myCell_n, etc...... where _n is the number/letter I've assigned to the given variable. But after that.... I'm lost. And yes, I'll admit part of this is somewhat intimidating, but since I've come this far, I have found I'm willing to let go of that, and move forward...... My questions are-- trying not to be too general, yet general enough to get the info I need-- what do I do next? 1- do I place the code elements for my variables within the sub for each inputbox (of the same name) of the form? I.e., how do I link the macro input demands to the form inputs? 2- how do I activate/cancel the form? From what I've tried thus far, it seems that I need to place the entire sub (for my macro) within the cmd_click_ok sub. Is there some basic code that activates the macro with that button? Similarly, is there some code that cancels when I click cancel? 3- ultimately, my goal will be to take some old C++ code that I've written, and make a windows program out of it using forms, etc.... (I took a C++ class 7-1/2 years ago, and we got to the very beginning of functions/classes. On my own, I began tinkering with forms, but never got far enough to understand what I was doing, and have found that it's now limiting my abilities in programming, and moving forward.). If this is going to be too complicated to explain here, please direct me to some good tutorials that will explain it more succinctly. Thank you. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Date field in user form & Loading a user form on opening workbook | Excel Programming | |||
Call user form from ThisWorkbook; close file if form closed | Excel Programming | |||
Automatically add a textbox to a user form based on user requireme | Excel Programming | |||
User form ComboBox Items: Remember user entries? | Excel Programming | |||
How to: User Form to assign a user defined range to a macro variab | Excel Programming |