the code you send me does what i mean but i get an error in

wb.SaveAs strFileName, FileFormat:=51

Error: the following features can not be saved in macro-free workbooks?