Home |
Search |
Today's Posts |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I like to qualify my objects. Me.cboerby means that it's the cboerby that's
part of this userform. Option Explicit Private Sub CommandButton1_Click() Unload Me End Sub Private Sub UserForm_Initialize() With Me.cboerby .AddItem "JM" .AddItem "PC" .AddItem "JT" End With End Sub Private Sub cmdok_Click() If Me.cboerby.ListIndex < 0 Then 'do nothing, nothing selected Else Worksheets("sheet1").Range("G2") = Me.cboerby.Value Unload Me '??? End If End Sub I plopped it into Worksheets("Sheet1"), too. jenniferThomson wrote: Hi I appreciate the help already given but I need some more help with my userform. So here goes: File named Tender Information data entry, 4 worksheets, one named Tender information is the sheet that the userform is attached. Button called enter name Private Sub cmdentername_Click() frmTenderEnq.Show End Sub This enables me to press enter name and userform comes up. I have the form codes Private Sub UserForm_Initialize() With cboerby AddItem "JM" AddItem "PC" AddItem "JT" End With cboerby.Value = "" End Sub and an okay button on form Private Sub cmdok_Click() End Sub This is were I need help I want the answer to go into cell G2 after this button has been clicked but at the moment when I use the form nothing happens. What should I enter under Private Sub cmdok_Click() and before End Sub to make this happen. Any assistance would be greatly appreciated Jennifer -- jenniferThomson ------------------------------------------------------------------------ jenniferThomson's Profile: http://www.excelforum.com/member.php...fo&userid=4561 View this thread: http://www.excelforum.com/showthread...hreadid=467508 -- Dave Peterson |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Assign Macro | Excel Worksheet Functions | |||
assign a macro | Excel Discussion (Misc queries) | |||
Assign a Macro | Excel Discussion (Misc queries) | |||
How to assign a macro | Excel Discussion (Misc queries) | |||
Un-assign a macro | New Users to Excel |