So I been banging my head trying to get this to work, it just don't seem to want to call a module when worksheet detects a change. I know it's detecting changes because this error pops up as soon as change is detected. Error picture
Private Sub Worksheet_Change(ByVal Target As Range)
Debug.Print "Worksheet_Change event fired"
Dim row As Long
'Check if the changed cells are in column D or F and have been filled
If Target.Column = 4 Or Target.Column = 6 Then
If Target.Value <> "" And Cells(Target.row, Target.Column - 1).Value <> "" Then
'Both cells in the row have been filled, ask the user if they want to run the script
row = Target.row
If MsgBox("Do you want to calculate the hours for " & row & "?", vbYesNo) = vbYes Then
'User clicked Yes, execute the script for the row
Select Case row
Case 10
Call Monday
MsgBox "Monday has been calculated"
Case 11
Call Tuesday
MsgBox "Tuesday has been calculated"
Case 12
Call Wednesday
MsgBox "Wednesday has been calculated"
Case 13
Call Thrusday
MsgBox "Thursday has been calculated"
Case 14
Call Friday
MsgBox "Friday has been calculated"
End Select
Else
'User clicked No, move to the next row (if it exists)
If row < 14 Then
'Move to the next row
Cells(row + 1, 4).Select
End If
End If
End If
End If
End Sub
All of the modules to call are public, example
Public Sub Monday()
'script here
End Sub
I've tried a host of things from application run, modules_name = "here", worksheet_calculate then change the script completely to work for worksheet_calculate. I am stumped. All modules are working as intended because I can manually run them and it works. Yes, I did try "Call Monday.Monday" as well.
Update, fixed errors. Still, no modules are being run. Also updated the script to watch for merged cell Pictures are worth 1000 words