hi all and thanks for any insight you may have into my issue.
The Process :
i run my app which takes every sheet in a workbook, copies each sheet and then creates it own workbook, saves that workbook as the sheets name. eg, workbook has 2 sheets, Plan_A and Plan_B. when the macro runs, worksheet Plan_A gets coppied to new workbook and then that workbook is now named Plan_A.
under 2003, this worked fine. in fact, i got the code on HOW to do it from here but had to tweak it a bit to fit my needs. my company then upgraded to 2007 and now when it runs, i get a nice "error - 1004" message. "Excel cannot insert the sheets into the destination workbook, because it contains fewer rows and columns than the source workbook..." i think this is because i am in a .xlsm format and when it opens a file to copy too, it does it as .xls (in fact, almost 99% sure). i have tried to get around this by saving the file type as .xlsx but i think the root of my problem is here...
[vba]
ActiveWorkbook.SaveAs _
Filename:=xpathname & wkSheetName & ".xlsx", _
FileFormat:=xlOpenXMLWorkbook, password:="", _
WriteResPassword:="", CreateBackup:=False, _
ReadOnlyRecommended:=False 'how we save new workbook with name and stuff
[/vba]
The problem:
how can i chage the above code so that when a new file is first opened (default is .xls), it saves it as file type .xlsx ?
i think the easy solution would be to set Excel so that it always starts off as .xlsx but my company has it locked so that it always creates in .xls. as of right now, there is NO getting around that.
again, thank you for your help. i have been working on this for a few months trying to get my IT group to change it's policy, but it was locked due to OTHER issues (macros) that wouldn't run right in 2007.