Hello. I'm new to the site (and to VBA code) and I'm hoping someone can help.
I found the a code on this site and modified it to match my sheet name and range. It works for the sheet named JAN but I want to include all the other sheets (FEB, MAR, etc). I've tried variations but I can only get it to work for one sheet at a time. Any help is appreciated.
![]()
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) set rng = Worksheets("JAN").Range("A2:A10") for each cell in rng if not isempty(cell) and isempty(cell.offset(0,7)) then Application.Goto cell.offset(0,7) Cancel = True msgbox "Reason required!" End if Next End Sub
Bookmarks