# Closing all tables

#### eventhestars

##### New Member
Hey everyone,
being a sloppy and unqualified SAS-user I sometimes open tables I created (VIEWTABLE) and then forget closing them before running my program again, which causes an error of course. Is there a command I could put at the beginning of my programs that closes all tables that are open?
I googled this, and could not find an answer, so sorry if this is a stupid question!
ets

#### Dason

%macro closetables;
%closetables;