Snaad
08-03-2016, 11:48 PM
Hi guys,
I'm pretty new to VBA but learning quickly. BUT, I have an error and can't seem to find out what's going wrong.
I have my button, with the following macro:
Sub NewRoute55_Click()
AddRoute55.Show
End Sub
Which should show the said AddRoute55 form. Except it doesn't. The form is named AddRoute55, so that should match up. The form has the following code:
Private Sub UserForm_Initialize()
'Empty Status
StatusBox.Clear
'Fill StatusBox
With StatusBox
.AddItem "Received"
.AddItem "Returned to PM"
.AddItem "In Progress"
.AddItem "On Hold"
.AddItem "Complete"
.AddItem "Closed"
.AddItem "RFC"
End With
'Empty BTBox
BTBox.Clear
'Fill BTBox
With BTBox
.AddItem "Run"
.AddItem "Change"
End With
'Empty DomainBox
DomainBox.Clear
'Fill DomainBox
With DomainBox
.AddItem "AMS NL"
.AddItem "AMS INT"
.AddItem "EUS"
.AddItem "IPS"
.AddItem "NGC"
.AddItem "Office"
.AddItem "SM"
End With
'Empty AIMSBox
AIMSBox.Value = ""
'Empty ProjectCoedeBox
ProjectCodeBox.Value = ""
'Empty PMBox
PMBox.Value = ""
'Empty POBox
POBox.Value = ""
'Empty VendorBox
VendorBox.Value = ""
'Set No FTR as default
FTRButton2.Value = True
'Empty OrderReceivedBox
OrderReceivedBox.Value = ""
'Empty OrderProcessedBox
OrderProcessedBox.Value = ""
'Empty SSDMBox
SSDMBox.Value = ""
'Empty P2PBox
P2PBox.Value = ""
'Empty CustomerBox
CustomerBox.Value = ""
'Empty PMABox
PMABox.Value = ""
'Empty SPBox
SPBox.Value = ""
End Sub
If you like more info or this helps out, you can download the file from my personal website, but I can't post links yet:yes
Please help me understand what I'm doing wrong here.:think:
Thanks in advance!
I'm pretty new to VBA but learning quickly. BUT, I have an error and can't seem to find out what's going wrong.
I have my button, with the following macro:
Sub NewRoute55_Click()
AddRoute55.Show
End Sub
Which should show the said AddRoute55 form. Except it doesn't. The form is named AddRoute55, so that should match up. The form has the following code:
Private Sub UserForm_Initialize()
'Empty Status
StatusBox.Clear
'Fill StatusBox
With StatusBox
.AddItem "Received"
.AddItem "Returned to PM"
.AddItem "In Progress"
.AddItem "On Hold"
.AddItem "Complete"
.AddItem "Closed"
.AddItem "RFC"
End With
'Empty BTBox
BTBox.Clear
'Fill BTBox
With BTBox
.AddItem "Run"
.AddItem "Change"
End With
'Empty DomainBox
DomainBox.Clear
'Fill DomainBox
With DomainBox
.AddItem "AMS NL"
.AddItem "AMS INT"
.AddItem "EUS"
.AddItem "IPS"
.AddItem "NGC"
.AddItem "Office"
.AddItem "SM"
End With
'Empty AIMSBox
AIMSBox.Value = ""
'Empty ProjectCoedeBox
ProjectCodeBox.Value = ""
'Empty PMBox
PMBox.Value = ""
'Empty POBox
POBox.Value = ""
'Empty VendorBox
VendorBox.Value = ""
'Set No FTR as default
FTRButton2.Value = True
'Empty OrderReceivedBox
OrderReceivedBox.Value = ""
'Empty OrderProcessedBox
OrderProcessedBox.Value = ""
'Empty SSDMBox
SSDMBox.Value = ""
'Empty P2PBox
P2PBox.Value = ""
'Empty CustomerBox
CustomerBox.Value = ""
'Empty PMABox
PMABox.Value = ""
'Empty SPBox
SPBox.Value = ""
End Sub
If you like more info or this helps out, you can download the file from my personal website, but I can't post links yet:yes
Please help me understand what I'm doing wrong here.:think:
Thanks in advance!