Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Iron Speed
Go Back   ASP Free ForumsProgrammingVisual Basic Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
SlickEdit: Code in over 40 languages across 7 platforms. SlickEdit’s unmatched power, speed, and flexibility allows even the most accomplished developers to write better code faster. Download a free trial today!
  #1  
Old July 12th, 2004, 09:36 AM
Grant5 Grant5 is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jul 2004
Posts: 1 Grant5 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Help with a combo box trick please!

I am using a UserForm in Excel to get user input that is sent to a spreadsheet.
What I am having trouble with is this:
I want the form to be able to change an existing entry. To do this, I have it set up so that when you make a selection in the first combo box, the existing values pop up in the other combo boxes.
The problem is that it won't change the fields on the sheet even when i change the entries in the combo boxes.

Please let me know if i am not explaining myself well. Appriciate any help!!

Sub filldata()
therow = 1
tryagain:
If Cells(therow, 1) = "" Then
GoTo gotit
End If
If Cells(therow, 1) = namedata Then
GoTo gotit
End If
therow = therow + 1
GoTo tryagain
gotit:
companydata.Value = Cells(therow, 2)
End Sub

Private Sub namedata_Change()
filldata
End Sub

Private Sub OK_Click()
writer
End Sub

Sub writer()
therow = 1
tryagain:
If Cells(therow, 1) = "" Then
GoTo gotit
End If
If Cells(therow, 1) = namedata Then
GoTo gotit
End If
therow = therow + 1
GoTo tryagain
gotit:
With Worksheets("sheet1")
.Cells(therow, 1) = namedata
.Cells(therow, 2) = companydata
End With
UserForm1.Hide
End Sub

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingVisual Basic Programming > Help with a combo box trick please!


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway