Prev: IF Statement or VLOOKUP
Next: Scales on Charts.
From: Kim on 1 Jun 2010 16:20 I have another kink in this. I am working in 2007, but original file was .xls and saved as .xls. With the SaveAs I originally had FileFormat:=xlNormal, but this returned "argument not found". "Dave Peterson" wrote: > Look at SaveCopyAs in VBA's help. > > Kim wrote: > > > > Using Excel 2007, I have a macro where I use a workbook, then save as a new > > named workbook. I want to keep the original workbook open. What code > > language will accomplish this? Even manually, I do not see how to save as a > > copy and keep original file open. > > > > Thank you > > -- > > Dave Peterson > . >
From: Dave Peterson on 1 Jun 2010 17:08 SaveCopyAs doesn't give you a choice of what type of file you're saving as. It's saving as an exact copy of the workbook file you're saving. If you need to change fileformat, then .savecopyas isn't going to do it by itself. You could: savecopyas open that copy you just saved. save it in the format you want. close that file. And the original workbook stays untouched. Kim wrote: > > I have another kink in this. > I am working in 2007, but original file was .xls and saved as .xls. With > the SaveAs I originally had FileFormat:=xlNormal, but this returned "argument > not found". > > "Dave Peterson" wrote: > > > Look at SaveCopyAs in VBA's help. > > > > Kim wrote: > > > > > > Using Excel 2007, I have a macro where I use a workbook, then save as a new > > > named workbook. I want to keep the original workbook open. What code > > > language will accomplish this? Even manually, I do not see how to save as a > > > copy and keep original file open. > > > > > > Thank you > > > > -- > > > > Dave Peterson > > . > > -- Dave Peterson
From: Kim on 1 Jun 2010 18:08 Actually, it is the same format that it started in, so I don't know what the problem is. "Dave Peterson" wrote: > SaveCopyAs doesn't give you a choice of what type of file you're saving as. > It's saving as an exact copy of the workbook file you're saving. > > If you need to change fileformat, then .savecopyas isn't going to do it by > itself. > > You could: > savecopyas > open that copy you just saved. > save it in the format you want. > close that file. > > And the original workbook stays untouched. > > > > Kim wrote: > > > > I have another kink in this. > > I am working in 2007, but original file was .xls and saved as .xls. With > > the SaveAs I originally had FileFormat:=xlNormal, but this returned "argument > > not found". > > > > "Dave Peterson" wrote: > > > > > Look at SaveCopyAs in VBA's help. > > > > > > Kim wrote: > > > > > > > > Using Excel 2007, I have a macro where I use a workbook, then save as a new > > > > named workbook. I want to keep the original workbook open. What code > > > > language will accomplish this? Even manually, I do not see how to save as a > > > > copy and keep original file open. > > > > > > > > Thank you > > > > > > -- > > > > > > Dave Peterson > > > . > > > > > -- > > Dave Peterson > . >
From: Dave Peterson on 1 Jun 2010 18:33
Don't use the fileformat parm in your .savecopyas line. If that doesn't help, then you'll have to share your code. Kim wrote: > > Actually, it is the same format that it started in, so I don't know what the > problem is. > > "Dave Peterson" wrote: > > > SaveCopyAs doesn't give you a choice of what type of file you're saving as. > > It's saving as an exact copy of the workbook file you're saving. > > > > If you need to change fileformat, then .savecopyas isn't going to do it by > > itself. > > > > You could: > > savecopyas > > open that copy you just saved. > > save it in the format you want. > > close that file. > > > > And the original workbook stays untouched. > > > > > > > > Kim wrote: > > > > > > I have another kink in this. > > > I am working in 2007, but original file was .xls and saved as .xls. With > > > the SaveAs I originally had FileFormat:=xlNormal, but this returned "argument > > > not found". > > > > > > "Dave Peterson" wrote: > > > > > > > Look at SaveCopyAs in VBA's help. > > > > > > > > Kim wrote: > > > > > > > > > > Using Excel 2007, I have a macro where I use a workbook, then save as a new > > > > > named workbook. I want to keep the original workbook open. What code > > > > > language will accomplish this? Even manually, I do not see how to save as a > > > > > copy and keep original file open. > > > > > > > > > > Thank you > > > > > > > > -- > > > > > > > > Dave Peterson > > > > . > > > > > > > > -- > > > > Dave Peterson > > . > > -- Dave Peterson |