Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 414
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,836
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Date field in user form & Loading a user form on opening workbook Balan Excel Programming 1 May 24th 08 03:40 PM
Call user form from ThisWorkbook; close file if form closed XP Excel Programming 2 July 20th 07 07:04 PM
Automatically add a textbox to a user form based on user requireme Brite Excel Programming 4 April 7th 07 11:37 PM
User form ComboBox Items: Remember user entries? [email protected] Excel Programming 0 March 29th 07 06:41 PM
How to: User Form to assign a user defined range to a macro variab TrevTrav Excel Programming 1 March 22nd 05 07:57 PM


All times are GMT +1. The time now is 01:06 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"