G
Guest
Dear Experts
I have an Auto_Open Macro using the If, Then, Else statement for each time I
open the spreadsheet it gives me the msgbox of percent completed. Here is
what I have so far and it works with one problem. If Range ("Schedule!L1") =0
or is blank I get the Debug window upon opening the spreadsheet. How do I
write this macro to tell Auto_open to ignore L1 cell if it is less then 0, or
= to 0 or is blank?
Cell L1 is formatted for percentage.
Sub Auto_Open()
Dim Value1 As Integer
Dim Value2 As Integer
If Range("Schedule!L1") > 0 Then
Value1 = Worksheets("Schedule").Range("L1") * 100
Value2 = Worksheets("Schedule").Range("M1") * 100
MsgBox "YOUR JOB IS " & (Value1) & " % " & "DETAILED" & " AND " & (Value2) &
" % " & "SHIPPED", vbInformation, "PERCENT COMPLETE"
End If
End Sub
I have an Auto_Open Macro using the If, Then, Else statement for each time I
open the spreadsheet it gives me the msgbox of percent completed. Here is
what I have so far and it works with one problem. If Range ("Schedule!L1") =0
or is blank I get the Debug window upon opening the spreadsheet. How do I
write this macro to tell Auto_open to ignore L1 cell if it is less then 0, or
= to 0 or is blank?
Cell L1 is formatted for percentage.
Sub Auto_Open()
Dim Value1 As Integer
Dim Value2 As Integer
If Range("Schedule!L1") > 0 Then
Value1 = Worksheets("Schedule").Range("L1") * 100
Value2 = Worksheets("Schedule").Range("M1") * 100
MsgBox "YOUR JOB IS " & (Value1) & " % " & "DETAILED" & " AND " & (Value2) &
" % " & "SHIPPED", vbInformation, "PERCENT COMPLETE"
End If
End Sub