VBA to Capture info from form and place in Spreadsheet

trevmac4

New Member
Joined
Jan 9, 2013
Messages
24
Hi I am new to VBA and would like assistance in completing my code below. I am trying to create a spreadsheet on Customers and the first form would allow user too input new customer and I would also like to build from this a form and code to allow user to 'Edit' customer information. Any and all assistance is appreciated.

This below code is all from UserForm1 and ranges are in worksheet "Planning". Button to load form, 'CommandButton1', is in "Main" worksheet

Private Sub CommandButton1_Click()
'OK
'Add info to next row if Text Box 1 not empty
'unload UserForm1

End Sub

Private Sub CommandButton2_Click()
'MainPage
'Unload UserForm1 and GoTo "Main" worksheet
End Sub

Private Sub CommandButton3_Click()
'Add New
'Unload UserForm1, Clear UserForm1
End Sub

Private Sub ListBox1_Click()
'Relationship
'Select from "Existing", "Prospect", "COI"
'Range BO401:B900
End Sub

Private Sub ListBox2_Click()
'Business Sector
'Select from "Feedlot", "Dairy", "Poultry", "Swine", "Agri-Business", "Grain", "Greenhouse", "Specialty Crop", "Fruit", "Other"
'Range BJ401:BJ900
End Sub

Private Sub ListBox3_Click()
'Opportunity Stage
'Select from "Lead", "Qualifying", "Qualified", "Discussion Paper", "Commitment Letter", "Business Won", "Business Lost"
'Range' BS401:BS900
End Sub

Private Sub ListBox4_Click()
'Existing Stage
'Select from "Review", "New Facility", "Increase", "Discussion Paper", "Commitment", "Business Won", "Business Lost"
'Range BK401:BK900
End Sub

Private Sub ListBox5_Click()
'Customer Size
'Select from "Core", "Growth", "Structured"
'Range BQ401:BQ900
End Sub

Private Sub ListBox6_Click()
'Customer Role
'Select from "Owner/President", "Director", "Manager", "Consultant", "Other"
'Range BI401:BI900
End Sub

Private Sub TextBox1_Change()
'Customer Name
'Range BG401:BG900

End Sub

Private Sub TextBox11_Change()


End Sub

Private Sub TextBox12_Change()


End Sub

Private Sub TextBox13_Change()

End Sub

Private Sub TextBox15_Change()
'Opportunity ($)
'Range BN401:BN900

End Sub

Private Sub TextBox2_Change()
'Notes
'Range BU401:BU900

End Sub

Private Sub TextBox4_Change()
'Customer Name
'Range BH401:BH900

End Sub

Private Sub TextBox5_Change()
'Opportunity Name
'Range BM401:BM900

End Sub

Private Sub TextBox6_Change()
'Current Facility ($)
'Range BL401:BL900

End Sub

Private Sub TextBox7_Change()
'Current Facility
'Range BK401:BK900

End Sub

Private Sub TextBox8_Change()

End Sub

Private Sub UserForm_Click()

End Sub
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
Do you have any code?

All of what you've posted is commented out.
 
Upvote 0
HI Yaren,
Hope this shows up, thank you!

Private Sub CommandButton1_Click()
'OK
'Add info to next row if Text Box 1 not ""
'unload userform1

End Sub

Private Sub CommandButton2_Click()
'MainPage
'Unload UserForm1 and GoTo "Main" worksheet
End Sub

Private Sub CommandButton3_Click()
'Add New
'Unload UserForm1, Clear UserForm1
End Sub

Private Sub ListBox1_Click()
'Relationship
'Select from "Existing", "Prospect", "COI"
'Range BO401:B900
End Sub

Private Sub ListBox2_Click()
'Business Sector
'Select from "Feedlot", "Dairy", "Poultry", "Swine", "Agri-Business", "Grain", "Greenhouse", "Specialty Crop", "Fruit", "Other"
'Range BJ401:BJ900
End Sub

Private Sub ListBox3_Click()
'Opportunity Stage
'Select from "Lead", "Qualifying", "Qualified", "Discussion Paper", "Commitment Letter", "Business Won", "Business Lost"
'Range' BS401:BS900
End Sub

Private Sub ListBox4_Click()
'Existing Stage
'Select from "Review", "New Facility", "Increase", "Discussion Paper", "Commitment", "Business Won", "Business Lost"
'Range BK401:BK900
End Sub

Private Sub ListBox5_Click()
'Customer Size
'Select from "Core", "Growth", "Structured"
'Range BQ401:BQ900
End Sub

Private Sub ListBox6_Click()
'Customer Role
'Select from "Owner/President", "Director", "Manager", "Consultant", "Other"
'Range BI401:BI900
End Sub

Private Sub TextBox1_Change()
'Customer Name
'Range BG401:BG900

End Sub

Private Sub TextBox11_Change()


End Sub

Private Sub TextBox12_Change()


End Sub

Private Sub TextBox13_Change()

End Sub

Private Sub TextBox15_Change()
'Opportunity ($)
'Range BN401:BN900

End Sub

Private Sub TextBox2_Change()
'Notes
'Range BU401:BU900

End Sub

Private Sub TextBox4_Change()
'Customer Name
'Range BH401:BH900

End Sub

Private Sub TextBox5_Change()
'Opportunity Name
'Range BM401:BM900

End Sub

Private Sub TextBox6_Change()
'Current Facility ($)
'Range BL401:BL900

End Sub

Private Sub TextBox7_Change()
'Current Facility
'Range BK401:BK900

End Sub

Private Sub TextBox8_Change()

End Sub

Private Sub UserForm_Click()

End Sub
 
Upvote 0

Forum statistics

Threads
1,215,480
Messages
6,125,049
Members
449,206
Latest member
Healthydogs

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