![]() |
![]() |
![]() |
|||||
![]() |
![]() |
![]() |
![]() |
![]() |
|||
| Welcome
to Tech Support Forum home to more then 136,000 problems solved. Issues
have included: Spyware, Malware, Virus Issues, Windows, Microsoft,
Linux, Networking, Security, Hardware, and Gaming Getting your
problem solved is as easy as: 1. Registering for a free account 2. Asking your question 3. Receiving an answer Registered members: * See fewer ads. * And much more..
|
| Want to know how to post a question? click here | Having problems with spyware and pop-ups? First Steps |
|
|||||||
| Microsoft Office support MS Office support forum |
![]() |
|
|
LinkBack | Thread Tools |
|
|
#1 (permalink) |
|
Registered User
Join Date: Jan 2009
Posts: 1
OS: xp pro
|
Hi
I'm working on a spreadsheet with contact details, Tel, Fax Contact name etc. I have a userform that can populate the details from the spreadsheet The Userform uses a combobox where the company can be selected and then the textboxes populates the contact details. My problem is i want changes that are made in the textboxes to be saved to the spreadsheet. |
|
|
|
| Important Information |
|
Join the #1 Tech Support Forum Today - It's Totally Free!
TechSupportForum.com is a leading support website for your computer needs. We offer free, friendly and personalized computer support. Why pay to have your computer fixed when you can do it for free. Join TechSupportforum.com Today - Click Here |
|
|
#2 (permalink) |
|
Registered User
Join Date: May 2008
Location: Baltimore, Maryland
Posts: 160
OS: Windows XP SP3
|
Re: VBA update spreadsheet
One way is to add a button to the UserForm that will transfer data from the TextBoxes to the spreadsheet.
For example, suppose you have a ComboBox named ComboBox1, and when you select a company name, a TextBox named Phone is filled with the corresponding phone number, which is stored in column C of the spreadsheet. You can set up a CommandButton to transfer data from TextBoxes to the spreadsheet after data in the form's Phone field is entered or changed. Suppose the phone number for the first company name is in C1, the phone number for the second company name is in C2, and so on. Suppose the CommandButton is named UpdateButton. You can set up the button with code such as: Code:
Private Sub UpdateButton_Click()
Cells(ComboBox1.ListIndex + 1, 3).Value = Phone.Value
End Sub
Modify as necessary. Last edited by David M58; 01-05-2009 at 06:56 PM. |
|
|
|
![]() |
| Thread Tools | |
|
|