Option Explicit
#If VBA7 Then
Private Declare PtrSafe Function SetTimer Lib "user32" (ByVal hwnd As LongPtr, ByVal nIDEvent As LongPtr, ByVal uElapse As Long, ByVal lpTimerFunc As LongPtr) As LongPtr
Private Declare PtrSafe Function KillTimer Lib "user32" (ByVal hwnd As LongPtr, ByVal nIDEvent As LongPtr) As Long
#Else
Private Declare Function SetTimer Lib "user32" (ByVal hwnd As Long, ByVal nIDEvent As Long, ByVal uElapse As Long, ByVal lpTimerFunc As Long) As Long
Private Declare Function KillTimer Lib "user32" (ByVal hwnd As Long, ByVal nIDEvent As Long) As Long
#End If
Sub Delete_Column()
With Worksheets("Sheet1")
If Range("D1") <> "Percentage" Then
SetTimer Application.hwnd, 0, 100, AddressOf VoiceMessage
MsgBox "Please Run Program First"
Exit Sub
Else: Columns("D:D").Delete
End If
End With
End Sub
Sub VoiceMessage()
KillTimer Application.hwnd, 0
Application.Speech.Speak "Please Run Program First"
End Sub