Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Excel 2003
Sorry, I'm drawing a blank. I just want VBA to open an existing xls as a copy. The user will then save it where it needs to go. Example path and file: c:\shared files\projects\mccoy.xls Another scenario is if it's a template file: c:\shared files\projects\mccoy.xlt Thanks, Chuck |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() sName = "c:\shared files\projects\mccoy.xls" workbooks.open sName, ReadOnly:=True -- Regards, Tom Ogilvy "c mateland" wrote: Excel 2003 Sorry, I'm drawing a blank. I just want VBA to open an existing xls as a copy. The user will then save it where it needs to go. Example path and file: c:\shared files\projects\mccoy.xls Another scenario is if it's a template file: c:\shared files\projects\mccoy.xlt Thanks, Chuck |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
That was it! I couldn't remember the strategy on doing it.
Thanks a bunch! -Chuck On Mar 15, 12:44 pm, Tom Ogilvy wrote: sName = "c:\shared files\projects\mccoy.xls" workbooks.open sName, ReadOnly:=True -- Regards, Tom Ogilvy "c mateland" wrote: Excel 2003 Sorry, I'm drawing a blank. I just want VBA to open an existing xls as a copy. The user will then save it where it needs to go. Example path and file: c:\shared files\projects\mccoy.xls Another scenario is if it's a template file: c:\shared files\projects\mccoy.xlt |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
if you want to open the orginal template for editing to be saved with another
name but still as a template, then add Editable:=True as well. Of course the User would have to choose to save it as a template I believe. -- Regards, Tom Ogilvy "c mateland" wrote: That was it! I couldn't remember the strategy on doing it. Thanks a bunch! -Chuck On Mar 15, 12:44 pm, Tom Ogilvy wrote: sName = "c:\shared files\projects\mccoy.xls" workbooks.open sName, ReadOnly:=True -- Regards, Tom Ogilvy "c mateland" wrote: Excel 2003 Sorry, I'm drawing a blank. I just want VBA to open an existing xls as a copy. The user will then save it where it needs to go. Example path and file: c:\shared files\projects\mccoy.xls Another scenario is if it's a template file: c:\shared files\projects\mccoy.xlt |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Maybe you could open it as a readonly document:
Dim wkbk As Workbook Set wkbk = Workbooks.Open(Filename:="book1.xls", ReadOnly:=True) Or open it as a template: Dim wkbk As Workbook Set wkbk = Workbooks.Add(template:="book1.xls") I would think that each would keep the original safe. c mateland wrote: Excel 2003 Sorry, I'm drawing a blank. I just want VBA to open an existing xls as a copy. The user will then save it where it needs to go. Example path and file: c:\shared files\projects\mccoy.xls Another scenario is if it's a template file: c:\shared files\projects\mccoy.xlt Thanks, Chuck -- Dave Peterson |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
"or open as a template" should have been phrased "or create a new workbook using
the existing file as a template". Dave Peterson wrote: Maybe you could open it as a readonly document: Dim wkbk As Workbook Set wkbk = Workbooks.Open(Filename:="book1.xls", ReadOnly:=True) Or open it as a template: Dim wkbk As Workbook Set wkbk = Workbooks.Add(template:="book1.xls") I would think that each would keep the original safe. c mateland wrote: Excel 2003 Sorry, I'm drawing a blank. I just want VBA to open an existing xls as a copy. The user will then save it where it needs to go. Example path and file: c:\shared files\projects\mccoy.xls Another scenario is if it's a template file: c:\shared files\projects\mccoy.xlt Thanks, Chuck -- Dave Peterson -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Copy Worksheet from one open workbook to another... | Excel Worksheet Functions | |||
Copy Values From A Non-Open Workbook? | Excel Programming | |||
Copy Values From A Non-Open Workbook | Excel Programming | |||
copy row to another open workbook | Excel Programming | |||
Does Workbook need to be open to copy to..from vba | Excel Programming |