Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
hello I am trying to figure out how to program excel to save a templete
through the save as function. this is what I am trying in my vb script... Excel.Application.ActiveWorkBook.SaveAs ("Filename:=c:\test.xlsm", "FileFormat:=xlOpenXMLWorkbookMacroEnabled") but when i run this command i get an error stating that the string is invalid...i have searched on msdn for how to do this ...and that is the way they said to do it...what am i missing |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Your quotes don't look right:
ActiveWorkbook.SaveAs Filename:="c:\test.xlsm", _ FileFormat:=xlOpenXMLWorkbookMacroEnabled -- Jim "Keith" wrote in message ... | hello I am trying to figure out how to program excel to save a templete | through the save as function. | | this is what I am trying in my vb script... | | Excel.Application.ActiveWorkBook.SaveAs ("Filename:=c:\test.xlsm", | "FileFormat:=xlOpenXMLWorkbookMacroEnabled") | | but when i run this command i get an error stating that the string is | invalid...i have searched on msdn for how to do this ...and that is the way | they said to do it...what am i missing | | |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thank you for your quick reply Jim,
I have tried the line that you supplied me, and i get error: the requested action with this item has failed.... is this a vista permission error? "Jim Rech" wrote: Your quotes don't look right: ActiveWorkbook.SaveAs Filename:="c:\test.xlsm", _ FileFormat:=xlOpenXMLWorkbookMacroEnabled -- Jim "Keith" wrote in message ... | hello I am trying to figure out how to program excel to save a templete | through the save as function. | | this is what I am trying in my vb script... | | Excel.Application.ActiveWorkBook.SaveAs ("Filename:=c:\test.xlsm", | "FileFormat:=xlOpenXMLWorkbookMacroEnabled") | | but when i run this command i get an error stating that the string is | invalid...i have searched on msdn for how to do this ...and that is the way | they said to do it...what am i missing | | |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Excel constants and named arguments aren't available to you when automating
Excel from script. Try substituting the actual values of the constants, and omitting the names (they must be in the default order of course...) Excel.Application.ActiveWorkbook.SaveAs "c:\test.xlsm", 1 'just guessing the value here - look it up in the Excel object browser Tim "Keith" wrote in message ... Thank you for your quick reply Jim, I have tried the line that you supplied me, and i get error: the requested action with this item has failed.... is this a vista permission error? "Jim Rech" wrote: Your quotes don't look right: ActiveWorkbook.SaveAs Filename:="c:\test.xlsm", _ FileFormat:=xlOpenXMLWorkbookMacroEnabled -- Jim "Keith" wrote in message ... | hello I am trying to figure out how to program excel to save a templete | through the save as function. | | this is what I am trying in my vb script... | | Excel.Application.ActiveWorkBook.SaveAs ("Filename:=c:\test.xlsm", | "FileFormat:=xlOpenXMLWorkbookMacroEnabled") | | but when i run this command i get an error stating that the string is | invalid...i have searched on msdn for how to do this ...and that is the way | they said to do it...what am i missing | | |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Excel.Application.ActiveWorkbook.SaveAs "c:\test.xlsm", 52 -- Jim "Tim Williams" <timjwilliams at gmail dot com wrote in message ... | Excel constants and named arguments aren't available to you when automating | Excel from script. | Try substituting the actual values of the constants, and omitting the names | (they must be in the default order of course...) | | Excel.Application.ActiveWorkbook.SaveAs "c:\test.xlsm", 1 'just guessing the | value here - look it up in the Excel object browser | | Tim | | "Keith" wrote in message | ... | Thank you for your quick reply Jim, | I have tried the line that you supplied me, and i get error: | | the requested action with this item has failed.... | | is this a vista permission error? | | "Jim Rech" wrote: | | Your quotes don't look right: | | ActiveWorkbook.SaveAs Filename:="c:\test.xlsm", _ | FileFormat:=xlOpenXMLWorkbookMacroEnabled | | | -- | Jim | "Keith" wrote in message | ... | | hello I am trying to figure out how to program excel to save a templete | | through the save as function. | | | | this is what I am trying in my vb script... | | | | Excel.Application.ActiveWorkBook.SaveAs ("Filename:=c:\test.xlsm", | | "FileFormat:=xlOpenXMLWorkbookMacroEnabled") | | | | but when i run this command i get an error stating that the string is | | invalid...i have searched on msdn for how to do this ...and that is the | way | | they said to do it...what am i missing | | | | | | | | | |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
ok i got this to work...kind of...
what i can run is: Excel.Application.ActiveWorkbook.SaveAs "test.xlsm" and that will work...but i can only get it to save into the documents driectory. how can i change where to save it to? "Jim Rech" wrote: Excel.Application.ActiveWorkbook.SaveAs "c:\test.xlsm", 52 -- Jim "Tim Williams" <timjwilliams at gmail dot com wrote in message ... | Excel constants and named arguments aren't available to you when automating | Excel from script. | Try substituting the actual values of the constants, and omitting the names | (they must be in the default order of course...) | | Excel.Application.ActiveWorkbook.SaveAs "c:\test.xlsm", 1 'just guessing the | value here - look it up in the Excel object browser | | Tim | | "Keith" wrote in message | ... | Thank you for your quick reply Jim, | I have tried the line that you supplied me, and i get error: | | the requested action with this item has failed.... | | is this a vista permission error? | | "Jim Rech" wrote: | | Your quotes don't look right: | | ActiveWorkbook.SaveAs Filename:="c:\test.xlsm", _ | FileFormat:=xlOpenXMLWorkbookMacroEnabled | | | -- | Jim | "Keith" wrote in message | ... | | hello I am trying to figure out how to program excel to save a templete | | through the save as function. | | | | this is what I am trying in my vb script... | | | | Excel.Application.ActiveWorkBook.SaveAs ("Filename:=c:\test.xlsm", | | "FileFormat:=xlOpenXMLWorkbookMacroEnabled") | | | | but when i run this command i get an error stating that the string is | | invalid...i have searched on msdn for how to do this ...and that is the | way | | they said to do it...what am i missing | | | | | | | | | |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel 2007 Macro/VB Question DDE Question | Excel Worksheet Functions | |||
excel 2007 macro question | Excel Discussion (Misc queries) | |||
Excel 2007 Macro Question | Excel Discussion (Misc queries) | |||
Excel 2007...what is the main programing tool | Excel Discussion (Misc queries) | |||
excel question borderline programing | New Users to Excel |