Nowadays market price uncertainty is one of the important challenging issues in the optimal scheduling of smart apartment building (SAB). So, in this paper, a robust optimization approach (ROA) is proposed for robust scheduling of SAB in the presence of price uncertainty. For modeling the market price uncertainty, upper and lower limits of the market price are considered instead of the forecasted market prices. The proposed sample system includes a SAB that contains ten smart homes (SHs) with different living habits and equipped with different equipment, i.e. combined heat and power (CHP), boiler, battery storage system (BSS), thermal storage system (TSS) and smart appliances. To assess the effectiveness of a home energy management system (HEMS) on the performance of the proposed problem, two different controlling scenarios are studied, namely normal and smart scenarios. It should be mentioned that the proposed model is formulated as mixed-integer linear programming (MILP) which guarantees global optimal solution and carried out with general algebraic modeling system (GAMS) software.