ipbr21054
Well-known Member
- Joined
- Nov 16, 2010
- Messages
- 5,859
- Office Version
- 2007
- Platform
- Windows
Please can you advise the following edit i need to make.
Currently my code in use opens a form where it looks at ComboBox2 value & if the value is ORIGINAL 2B it opens the form RangerPcb
This is where i need that to be changed.
I would like it to also look at another value & then open the correct form.
It should work like this but obviously written correctly.
If ComboBox2.Value = "ORIGINAL 2B" & TextBox3.Value = "41835" Then
RangerPcb41835.Show
Else
If ComboBox2.Value = "ORIGINAL 2B" & TextBox3.Value = "41601" Then
RangerPcb41601.Show
Thanks
Currently my code in use opens a form where it looks at ComboBox2 value & if the value is ORIGINAL 2B it opens the form RangerPcb
This is where i need that to be changed.
I would like it to also look at another value & then open the correct form.
It should work like this but obviously written correctly.
If ComboBox2.Value = "ORIGINAL 2B" & TextBox3.Value = "41835" Then
RangerPcb41835.Show
Else
If ComboBox2.Value = "ORIGINAL 2B" & TextBox3.Value = "41601" Then
RangerPcb41601.Show
Thanks
VBA Code:
If ComboBox2.Value = "ORIGINAL 2B" Then
Unload RangerFormRemote
RangerPcbNumber.Show
Else
With .Range("I5")
.Value = "N/A"
.Font.Size = 14
.Font.NAME = "Calibri"
.Font.Bold = True
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlVAlignCenter
Unload RangerFormRemote
End With
If .AutoFilterMode Then .AutoFilterMode = False
x = .Cells(.Rows.count, 5).End(xlUp).Row
.Range("A4:I" & x).Sort Key1:=Range("B5"), Order1:=xlAscending, Header:=xlGuess
MsgBox "DATABASE UPDATED SUCCESSFULLY", vbInformation, "SUCCESSFUL MESSAGE"
.Range("B5").Select
End If
End With
End Sub