Programming Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsOtherProgramming Help

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:
  #1  
Old September 21st, 2005, 01:41 PM
StThomas StThomas is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Posts: 3 StThomas User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 36 m 42 sec
Reputation Power: 0
Need Assistance with Code

Hi,

I created a form in Excel, and in the form is a list box with some drop down boxes. There is a current "enter" button on the form, which populates a spreadsheet with the entered information once it is clicked. My problem is with the List Box. The list box's Row Source is set up to pull from data (street addresses) that is already in the spreadsheet. I just put the list down box there, so that users can identify which address they are populating the information to. Is it possible to be able to click on the address in the list box and click "enter" so that it will automatically find the matching address in the spreadsheet?

I attached my code for a reference. If you have any suggestions or ideas, it would help out a lot.

Thanks!



Private Sub cmdCancel_Click()

Unload Me

End Sub
Private Sub cmdOK_Click()
ActiveWorkbook.Sheets("Dilapidation Form").Activate

Range("I2").Select

Do

If IsEmpty(ActiveCell) = False Then


ActiveCell.Offset(1, 0).Select

End If

Loop Until IsEmpty(ActiveCell) = True

ActiveCell.Offset(0, 1) = lbAddressList.Value



ActiveCell.Offset(0, 2) = cboAsbestos.Value

ActiveCell.Offset(0, 3) = cboEstimable.Value

ActiveCell.Offset(0, 4) = txtAmount.Value



ActiveCell.Offset(0, 5) = cboMercury.Value

ActiveCell.Offset(0, 6) = cboEstimable2.Value

ActiveCell.Offset(0, 7) = txtAmount2.Value



ActiveCell.Offset(0, 8) = cboLeadBasedPaint.Value

ActiveCell.Offset(0, 9) = cboEstimable3.Value

ActiveCell.Offset(0, 10) = txtAmount3.Value



ActiveCell.Offset(0, 11) = cboFixedAssetCleanUp.Value

ActiveCell.Offset(0, 12) = cboEstimable4.Value

ActiveCell.Offset(0, 13) = txtAmount4.Value



ActiveCell.Offset(0, 14) = cboGroundWater.Value

ActiveCell.Offset(0, 15) = cboEstimable5.Value

ActiveCell.Offset(0, 16) = txtAmount5.Value



ActiveCell.Offset(0, 17) = cboABGroundStorage.Value

ActiveCell.Offset(0, 18) = cboEstimable6.Value

ActiveCell.Offset(0, 19) = txtAmount6.Value



ActiveCell.Offset(0, 20) = cboOther.Value

ActiveCell.Offset(0, 21) = cboEstimable7.Value

ActiveCell.Offset(0, 22) = txtAmount7.Value



Range("I2").Select


End Sub


Private Sub cmdClearForm_Click()

Call UserForm_Initialize

End Sub





Private Sub UserForm_Initialize()
txtAmount.Value = ""
lbAddressList.Value = ""

With cboAsbestos

.AddItem "Yes"

.AddItem "No"


End With

cboAsbestos.Value = ""

With cboEstimable

.AddItem "Yes"

.AddItem "No"


End With



txtAmount2.Value = ""

With cboMercury

.AddItem "Yes"

.AddItem "No"


End With

cboMercury.Value = ""

With cboEstimable2

.AddItem "Yes"

.AddItem "No"


End With



txtAmount3.Value = ""

With cboLeadBasedPaint

.AddItem "Yes"

.AddItem "No"


End With

cboLeadBasedPaint.Value = ""

With cboEstimable3

.AddItem "Yes"

.AddItem "No"


End With



txtAmount4.Value = ""

With cboFixedAssetCleanUp

.AddItem "Yes"

.AddItem "No"


End With

cboFixedAssetCleanUp.Value = ""

With cboEstimable4

.AddItem "Yes"

.AddItem "No"


End With



txtAmount5.Value = ""

With cboGroundWater

.AddItem "Yes"

.AddItem "No"


End With

cboGroundWater.Value = ""

With cboEstimable5

.AddItem "Yes"

.AddItem "No"


End With



txtAmount6.Value = ""

With cboABGroundStorage

.AddItem "Yes"

.AddItem "No"


End With

cboABGroundStorage.Value = ""

With cboEstimable6

.AddItem "Yes"

.AddItem "No"


End With



txtAmount7.Value = ""

With cboOther

.AddItem "Yes"

.AddItem "No"


End With

cboOther.Value = ""

With cboEstimable7

.AddItem "Yes"

.AddItem "No"


End With


lbAddressList.SetFocus


End Sub

Reply With Quote
Reply

Viewing: ASP Free ForumsOtherProgramming Help > Need Assistance with Code


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 5 hosted by Hostway