LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 363
Default Is there something wrong with my code?

I am pulling data into a userform, then if needed it can be modified,
but if i make a modification i do NOT sem to get any data to change accordingly, why ?

Private Sub CommandButton1_Click()
Application.ScreenUpdating = False
Dim rngFound As Range
On Error Resume Next

With Worksheets("Contact List").Range("A:A")
Set rngFound = .Find(What:=Me.ComboBox1.Value, After:=.Columns("A"), LookIn:=xlValues,
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False, Matchbyte:=False)
If ListBox1.Value = rngFound.Offset(0, 1).Value Then
TextBox1.Value = rngFound.Offset(0, 10).Value
ComboBox2.Value = rngFound.Offset(0, 11).Value
TextBox2.Value = rngFound.Offset(0, 12).Value
TextBox3.Value = rngFound.Offset(0, 13).Value
TextBox4.Value = rngFound.Offset(0, 14).Value
TextBox5.Value = rngFound.Offset(0, 15).Value
TextBox6.Value = rngFound.Offset(0, 16).Value
TextBox7.Value = rngFound.Offset(0, 17).Value
ComboBox3.Value = rngFound.Offset(0, 18).Value
If CheckBox1 = True Then rngFound.Offset(0, 19).Value = "415v" Else rngFound.Offset(0, 19).Value
= ""
If CheckBox2 = True Then rngFound.Offset(0, 20).Value = "240v" Else rngFound.Offset(0, 20).Value
= ""
If CheckBox3 = True Then rngFound.Offset(0, 21).Value = "Other ...." Else rngFound.Offset(0,
21).Value = ""
If CheckBox4 = True Then rngFound.Offset(0, 22).Value = "GOOD" Else rngFound.Offset(0, 22).Value
= ""
If CheckBox5 = True Then rngFound.Offset(0, 23).Value = "FAIR" Else rngFound.Offset(0, 23).Value
= ""
If CheckBox6 = True Then rngFound.Offset(0, 24).Value = "POOR" Else rngFound.Offset(0, 24).Value
= ""
If CheckBox7 = True Then rngFound.Offset(0, 25).Value = "OTHER .." Else rngFound.Offset(0,
25).Value = ""
MsgBox "Done!"
Else
MsgBox "There is NO Record of that Site OR Contact Person ! ", vbCritical, " ...."
End If
End With
Unload Me
Application.ScreenUpdating = True
End Sub


Am i missing something ?

Corey....


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
What is wrong with the code? Eric Excel Discussion (Misc queries) 2 September 13th 07 10:36 AM
Can someone tell me what is wrong with this code? Ant Excel Discussion (Misc queries) 8 November 14th 05 02:53 PM
HELP! What's wrong with my code? Sethaholic[_6_] Excel Programming 0 July 11th 05 07:37 PM
What is wrong with this code? Jan Excel Programming 4 June 14th 05 06:48 PM
Is something wrong with the code Patrick Molloy[_3_] Excel Programming 1 July 15th 03 08:28 AM


All times are GMT +1. The time now is 02:39 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"