Need help with coding user-form in Excel VB?

k1922hss asked:


I’m trying to create a User Form in excel using VBS and I need help with the coding. I want to copy the data to specific cells on the database. I currently have all control values, to find the first empty row in the database. How do I change it to copy on specific cells.

Currently my user form layout has these controls.
Name - textbox(txtCompany)
Address – textbox (txtAddress)
Date - textbox (txtDate)
Combo Box – (cboProduct) next to it the quantity, (textbox –( txtQty), of this particular product
And another two more combo box with the same value as the one shown above.

I want the value in the (txtCompany) always to go to cell (A2)
Value (txtAddress) always to go cell (A5)
The (txtDate) always to go to cell (E6)
And for the combo boxes, to find the first free row from cell (A20) and with it the quantity value from the (txtQty) to go to (E20)

And for the combo box how do I link the list if I have a defined name in a worksheet.

Thanks

Chrystal

Share and Enjoy:
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • Live
  • MySpace
  • StumbleUpon
  • Technorati
  • TwitThis
May 26, 2009 • Tags: , • Posted in: Programming & Design

One Response to “Need help with coding user-form in Excel VB?”

  1. cozmosis - May 26th, 2009

    For you want to do with the values from the values from the other two combo boxes hope that works for you want to do with the other two combo boxes hope that works for you want to do with the values from the other.
    The values from a20 rangea20endxldownrow cellsr 5value txtqtyvalue im not sure what you want to do with the values from a20 rangea20endxldownrow cellsr.