leighjones123
New Member
- Joined
- Aug 12, 2011
- Messages
- 49
- Office Version
- 365
- Platform
- MacOS
Hi All
Very much a newbie at this and this is my first VB Project for Work.
Wonder if anyone could help me...
I keep getting a Run time 404 - object required message.
I've played around and cannot work it out..
This is my Module to open my form...
This is my user form code..
When i get the error and i click Debug, it highlights:
Could anyone please help? I'd be so appreciative!!
Thanks,
Leigh
Very much a newbie at this and this is my first VB Project for Work.
Wonder if anyone could help me...
I keep getting a Run time 404 - object required message.
I've played around and cannot work it out..
This is my Module to open my form...
Code:
Sub OpenNewRequest()
frmNewRequest.Show
End Sub
This is my user form code..
Code:
Private Sub cmdCancel_Click()
Unload Me
End Sub
Private Sub cmdClearForm_Click()
Call UserForm_Initialize
End Sub
Private Sub cmdOK_Click()
ActiveWorkbook.Sheets("Raw Data").Activate
Range("B2").Select
Do
If IsEmpty(ActiveCell) = False Then
ActiveCell.Offset(1, 0).Select
End If
Loop Until IsEmpty(ActiveCell) = True
ActiveCell.Value = txtName.Value
ActiveCell.Offset(0, 1) = txtEmail.Value
ActiveCell.Offset(0, 2) = cboDepartment.Value
ActiveCell.Offset(0, 3) = cboRequesttype.Value
ActiveCell.Offset(0, 4) = txtCTN.Value
ActiveCell.Offset(0, 5) = txtDateTime.Value
ActiveCell.Offset(0, 6) = txtAgent.Value
ActiveCell.Offset(0, 7) = txtDetail.Value
ActiveCell.Offset(0, 8) = txtCost.Value
ActiveCell.Offset(0, 9) = Now()
Sheets("Sheet3").Select
Unload Me
frmConfirmSubmit.Show
End Sub
Private Sub txtPhone_Change()
End Sub
Private Sub UserForm_Initialize()
txtName.Value = ""
txtPhone.Value = ""
With cboDepartment
.AddItem "TSC Warrington"
.AddItem "TSC Kilmarnock"
.AddItem "TSC Dearne Valley"
.AddItem "Stoke"
.AddItem "Newark"
.AddItem "Egypt"
.AddItem "LBM"
End With
cboDepartment.Value = ""
With cboCourse
.AddItem "Advisor Feedback"
.AddItem "Call Listening Request"
.AddItem "Process Feedback"
End With
cboCourse.Value = ""
optIntroduction = True
chkLunch = False
chkVegetarian = False
txtName.SetFocus
End Sub
When i get the error and i click Debug, it highlights:
Code:
Sub OpenNewRequest()
[B][COLOR=sandybrown] frmNewRequest.Show[/COLOR][/B]
End Sub
Could anyone please help? I'd be so appreciative!!
Thanks,
Leigh