LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 88
Default Userform ComboBox and TextBox help!!!

Hi all...

I need help with a userform I created that has 1 combo box
and 1 textbox and two command buttons in it.

I have figured out how to populate the combo and text box
with the information I want to see when the userform is
activated, but know I want to be able to select an entry
out of the combo box and perform a macro that calculates
in a particular cell/column.

Basically this is what I have and want to do.

Textbox displays one mane out of 4. The combo box displays
up to 8 different options to choose from. In my
spreadsheet is an entry field that corresponds to the
choice options. With 4 names displayed out over 4 columns
(D11-G11) of information. When textbox is equal to current
name (D11=CurrentName or E11=CurrentName or
F11=CurrentName or G11=CurrentName) and the user selects
the option to take from the combo box. I want a command
button to be pressed and then a macro will perform the
appropriate function in the correct cell under the correct
person name.

In lamens terms... If D11=CurrentName and option is = to
New customer account, go to and select cell d11 move down
5 cells and perform the rest of the macro.
If F11=CurrentName and option is = to Old customer Rep, go
to and select cell F11 move down 20 cells and perform the
rest of the macro.

I don't know if this is possible but this is what I want
to do. This is what I got so far and it works up until you
want to perform the macro based on the option selected.

Private Sub CommandButton1_Click()
Unload UserForm3
Select Case ComboBox1.ListIndex
Case 0:
Case 1:
Case 2:
Case 3:
Case 4:
Case 5:
Case 6:
Case 7:
Case 8:
End Select
AddTotal
End Sub

Private Sub CommandButton2_Click()
Unload UserForm3
Select Case ComboBox1.ListIndex
Case 0:
Case 1:
Case 2:
Case 3:
Case 4:
Case 5:
Case 6:
Case 7:
Case 8:
End Select
TakeZero
End Sub

Private Sub UserForm_Activate()
With ComboBox1
.AddItem Range("F55")
.AddItem Range("F56")
.AddItem Range("F57")
.AddItem Range("F58")
.AddItem Range("F59")
.AddItem Range("F60")
.AddItem Range("F61")
.AddItem Range("F62")
.ListIndex = 0
End With
With TextBox1
TextBox1.Value = ActiveSheet.Range("CurrentName").Value
End With
End Sub

Any help or insight is much appreciated.
Regards,
Pete
 
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
ComboBox linked to TextBox capt Excel Discussion (Misc queries) 4 February 19th 08 10:26 PM
TextBox linked to a ComboBox? capt Excel Discussion (Misc queries) 3 February 16th 08 02:50 PM
combobox /textbox value flow23 Excel Discussion (Misc queries) 0 April 19th 06 03:18 PM
UserForm TextBox/ComboBox question grasping@straws Excel Discussion (Misc queries) 1 February 2nd 05 11:14 AM
UserForm TextBox to ActiveSheet TextBox over 256 characters Dan E[_2_] Excel Programming 1 July 28th 03 07:36 PM


All times are GMT +1. The time now is 06:24 AM.

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

About Us

"It's about Microsoft Excel"