Create UserForm

Halos

New Member
Joined
Feb 14, 2015
Messages
34
Dear Sir,

I have added new Userform1 and added combobox1 + label1 and textbox1 + label1. Then added command button1 (name is submit) (when you click this button it will add info to excel sheet). I want to see combobox1 as filter which including name of material and cost. When I click selected material, it should be added this information to the any excel sheet.
b33qce


I know there is something missing and cannot do it. Could you please help me to create new Userform and including combobox which I can filter and select material name (material names need to be took from any excel sheet) and when I click ok then this need to be saved "account" sheet (each time need insert new row).

I appreciate your help.

Thank you in advance

Code:
Private Sub CommandButton1_Click()
If ComboBox1 = vbNullString Or TextBox1 = vbNullString Or TextBox2 = vbNullString Then
MsgBox "Please add date"
Else
      
      Sheets("account" + ComboBox1.Value).Rows(6).Insert
      
      Sheets("account" + ComboBox1.Value).Range("C6") = TextBox2
      
      
     Unload UserForm1
      End sub
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top