Mandatory cell input

handri

Board Regular
Joined
Nov 25, 2017
Messages
88
Office Version
  1. 365
  2. 2021
Platform
  1. Windows
Hi,

I looking for a new vba code for these.
In my workbook. I need to make B6 cell as mandatory or need to fill first before you can do other work in workbook.
Also a message popup if they not fill the B6 FIRST. Meant after save and open if B6 are filled you can continue your work.

Thank you
 
thank Sir

I have modified as below code and works well, thank you
Code:
  Private Sub Worksheet_Change(ByVal Target As Range)  If Target.Count > 1 Then Exit Sub
  If Target.Value = "" Then Exit Sub
  If Not Intersect(Target, Range("A7:A10001")) Is Nothing Then
    If Cells(Target.Row, "C").Value = "SALAH MODEL" Then
      MsgBox "SALAH MODEL/PERIKSA SEMULA MODEL", vbCritical
      Target.Select
      End If
      '   Check to see if B6 is populated
    If Len(Range("B4")) = 0 Then
        Application.EnableEvents = False
        Target.ClearContents
        MsgBox "ISI NAMA MODEL DAHULU SEBELUM MULAKAN PROSES SCAN!", vbOKOnly, "ENTRY ERROR!"
        Application.EnableEvents = True
    End If
End If
End Sub
 
Upvote 0

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.

Forum statistics

Threads
1,214,593
Messages
6,120,435
Members
448,961
Latest member
nzskater

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top