Stelios Panayides
New Member
- Joined
- Jul 28, 2008
- Messages
- 14
I am using the following macro to prevent printing if there is no text in a specific cell:
Sub Macro1()
Sheets("Sheet1").Select
If Range("A1") <> "." Then
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
End If
End Sub
The macro is working fine and the sheet is not printed when in the cell there was only a dot.
But when I removed the dot (".") from the if statement i.e. use the macro:
Sub Macro1()
Sheets("Sheet1").Select
If Range("A1") <> "" Then
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
End If
End Sub
the sheet is now printed.
Any ideas would be highly appreciated.
Sub Macro1()
Sheets("Sheet1").Select
If Range("A1") <> "." Then
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
End If
End Sub
The macro is working fine and the sheet is not printed when in the cell there was only a dot.
But when I removed the dot (".") from the if statement i.e. use the macro:
Sub Macro1()
Sheets("Sheet1").Select
If Range("A1") <> "" Then
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
End If
End Sub
the sheet is now printed.
Any ideas would be highly appreciated.