richiesngh35
New Member
- Joined
- Mar 29, 2019
- Messages
- 1
I have an excel template (Productivity Tracker), where we have to put specific request number based on various task. For e.g. for task MDC Account Creation, request number should start with "A" follow by seven digits(numbers) ex A9827366, total length 8. So, for each different unique task I have defined Starting Alphabet and number of digits in a different sheet. When an employee enter a request number in the request number field it than automatically match the input with the already defined details(Starting Alphabet and number of digits) which will reflect in D7 cell(Starting Alphabet match) as True/False/#N/A and E7 cell(length match) as True/False/#N/A. If the result is "false", it will through a msg "Incorrect Length of Request Number" or "Incorrect Request Number". As a result it won't be saved in the data base.
I want these two msg to to be ignored for few tasks for which I have not defined any (Starting Alphabet and Length) due to which it shows "#N/A" in D7 or E7 cell.
I just was this msg to not come when both the cell value says "#N/A".
Code:
If (Worksheets("Entry").Range("d7").Value = False) Then
MsgBox ("Incorrect Request Number"), vbCritical
Sheet1.Protect Password:="xepo101"
Exit Sub
End If
If (Worksheets("Entry").Range("e7").Value = False) Then
MsgBox ("Incorrect Length of Request Number"), vbCritical
Sheet1.Protect Password:="xepo101"
Exit Sub
End If
I want these two msg to to be ignored for few tasks for which I have not defined any (Starting Alphabet and Length) due to which it shows "#N/A" in D7 or E7 cell.
I just was this msg to not come when both the cell value says "#N/A".
Code:
If (Worksheets("Entry").Range("d7").Value = False) Then
MsgBox ("Incorrect Request Number"), vbCritical
Sheet1.Protect Password:="xepo101"
Exit Sub
End If
If (Worksheets("Entry").Range("e7").Value = False) Then
MsgBox ("Incorrect Length of Request Number"), vbCritical
Sheet1.Protect Password:="xepo101"
Exit Sub
End If