Microsoft
Software
Hardware
Network
Question : VBA RunTime Error 424 Object Required Excel
Hi GUys,
I've had some EXCELLENT help with an expert from here on getting my userform going and just one small little thing is happening, I'm getting a run time error 424 object required and it is highlight this line
If c.Value & " " & c.Offset(0, 1).Value = cmbnames.Text And c.Offset(0, 5).Value = txtTrainSessionNo.Text Then
Here is the code below:
Private Sub btnSubmitStats_Click()
Dim wb As Workbook
Dim ws As Worksheet
Dim rng1 As Range
Dim rng2 As Range
Dim c As Range
Dim s As Integer
Set wb = ActiveWorkbook
Set ws = ActiveSheet
Set rng1 = ws.Range("G2:G" & (Range("G65536").End(xlUp)
.Row))
For Each c In rng1
If c.Value & " " & c.Offset(0, 1).Value = cmbnames.Text And c.Offset(0, 5).Value = txtTrainSessionNo.Text Then
c.Offset(0, 6).Value = txtWrittenAssess.Text
c.Offset(0, 7).Value = cboGrade.Text
End If
Next
cmbnames.SetFocus
If cmbnames.ListCount <> 0 Then
For i = 0 To cmbnames.LineCount - 1
If cmbnames.List(i) = cmbnames.Text Then
cmbnames.RemoveItem (i)
End If
Next
End If
cmbnames.Value = ""
End Sub
I actually can't see anything wrong with it because this only started happening after changing a txt field to a combo box on the userform.
File is attached below:
Any Help will be appreciated
cheers
Attachments:
Copy-of-Samplex-4.xls
(56 KB)
(File Type Details)
sample file with dummy data
Answer : VBA RunTime Error 424 Object Required Excel
Replace "txtTrainSessionNo" in this string with "cmbTrainSessionNo", i.e. to the name of Combobox.
Alex
Random Solutions
Defrag an SQL DB
VMware ESXI help
Outlook 2007 Continually asks for an Exchange Server password
how to hide/ view columns in a gridview using checkboxes in CustomEditorpart in sharepoint
Remote Desktop Connection to Windows SBS 2008
admin rights to IIS for a User
SSG5 VPN Routing, internal LAN route works, VPN route doesnt.
How can Broadband access be split between 2 ISPs?
How to block web proxys like ninjacloak.com?
Active Directory mailbox Permissions changed