View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Matthew Herbert[_3_] Matthew Herbert[_3_] is offline
external usenet poster
 
Posts: 149
Default Excel/VBA Coding Help

JoeMathews,

I initial read your post incorrectly, however, the questions regarding the
type of control(s) you want filled is very relevant in this case. If your
control is a ListBox or ComboBox, look up .List (which can be an array
reference), .RowSource (which can be a spreadsheet location reference),
..AddItem (which can be a single addition) in the help section.

Best,

Matt

"Matthew Herbert" wrote:

JoeMathews,

I'm not sure how a two product cost comparison would yield a complex formula
that requires the use of a UserForm, but nonetheless, there needs to be more
detail behind what you are trying to accomplish. Some sample questions that
I'm sure most people will be wondering about are below.

What types of controls does your UserForm contain? Is it something where
the user selects an item from ComboBox1, selects an item from ComboBox2, and
then clicks a CommandButton that executes the formula? Whenever a result is
created, where on the spreadsheet do you want it to end up? Do you want a
TextBox value and ComboBox value to be inserted onto the spreadsheet and if
so where on the spreadsheet do you want those values inserted? Are the
UserForm inputs necessary to the formula calculation, and if so how are the
inputs related? (I think you get the point regarding how to be more
detailed).

It general, the more specific you are, the better posters will be able to
assist you. Also, if you have VBA code, post it along with where you are
experiencing problems (or have questions, difficulties, etc.) with the code.
It's nice to know that your UserForm looks great, but your description leaves
everyone wondering what's going on with the guts behind the UserForm.

Best,

Matthew Herbert

"JoeMathews" wrote:

Forgive the stupidity of the question, but I am an experienced Excel user
trying VBA for user forms for the first time.

I have an Excel spreadsheet that is a 2 column Cost Savings Calculator. It
compares costs between two different products. The formula is fairly complex,
so I created a VBA user form.

My problem is that it looks great, but I can't figure out the coding. I
basically need the Excel cells to populate the corresponding VBA form fields.