Private Sub CommandButton1_Click()
Dim wbThis As Workbook
Dim wbThat As Workbook
Dim ws As Worksheet
Dim x As Integer
Dim y As Integer
Dim Response As VbMsgBoxResult
Dim LR As Long, o As Long
Dim rngFind As Range, rngRow As Range
If Not AllComboBoxesFilled() Then
MsgBox "Please complete the form, all boxes are required.", vbExclamation, "Update Store Hours"
Else
Application.ScreenUpdating = False
Set ws = ThisWorkbook.Sheets("StoreHours")
StoreNumber1 = Worksheets("MyStoreInfo").Range("C2")
Set rngFind = ws.Range("C:C").Find(What:=StoreNumber1, MatchCase:=True)
If Not rngFind Is Nothing Then
rngFind.Offset(0, 3).Value = Me.SundayOpen.Value
rngFind.Offset(0, 4).Value = Me.SundayClose.Value
rngFind.Offset(0, 5).Value = Me.MondayOpen.Value
rngFind.Offset(0, 6).Value = Me.MondayClose.Value
rngFind.Offset(0, 7).Value = Me.TuesdayOpen.Value
rngFind.Offset(0, 8).Value = Me.TuesdayClose.Value
rngFind.Offset(0, 9).Value = Me.WednesdayOpen.Value
rngFind.Offset(0, 10).Value = Me.WednesdayClose.Value
rngFind.Offset(0, 11).Value = Me.ThursdayOpen.Value
rngFind.Offset(0, 12).Value = Me.ThursdayClose.Value
rngFind.Offset(0, 13).Value = Me.FridayOpen.Value
rngFind.Offset(0, 14).Value = Me.FridayClose.Value
rngFind.Offset(0, 15).Value = Me.SaturdayOpen.Value
rngFind.Offset(0, 16).Value = Me.SaturdayClose.Value
rngFind.Offset(0, 17).Value = Me.Month.Value
rngFind.Offset(0, 18).Value = Me.Year.Value
MsgBox "Store Hours have been updated", vbInformation, "Update Store Hours"
Application.ScreenUpdating = True
StoreHours.Hide