With
Sub macroprint()
For Each Sh In ActiveWorkbook.sheets
If Sh.Visible = -1 And val(Sh.Range("E1").Value) > 40544 And Sh.Range("C2").Value <> "Occupied" Then c01 =c01 & "|" & sh.name
Next
If isempty(c01) Then
MsgBox "No Vacant Dirty", vbExclamation
else
activeworkbook.sheets(split(mid(c01,2),"|")).printout
End If
End Sub
I receive a Runtime error '438' Object does not support this property or method.
And still the line highlighted by the debugger is basically the same.
If Sh.Visible = -1 And Val(Sh.Range("E1").Value) > 40544 And Sh.Range("C2").Value <> "Occupied" Then c01 = c01 & "|" & Sh.Name
This file is moved back and forth from a sharepoint site everyday. Could that be causing corruption problems?
Bookmarks