Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
SaveAs and relative path
Hello,
I am trying to save a Workbook object using the Excel 9.0 Object library and VB.Net. I am executing this statement: oBook.SaveAs(ReportPath & Me.txtFileName.Text) where 'ReportPath & Me.txtFileName.Text' resolves to '..\Serial Worksheets\myFile.txt'. This is being saved from an exe in a 'bin' directory on the same level as the 'Serial Worksheets' directory. Like: _Project |_ bin <==exe lives here |_Serial Worksheets <==workbook should save here The SaveAs method fails because it is trying to save the workbook up 3 levels from the bin directory where Serial Worksheets does not exist. Anyone have any ideas what is going on? TIA, Steve |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
SaveAs and relative path
Hi Dev,
The SaveAs method fails because it is trying to save the workbook up 3 levels from the bin directory where Serial Worksheets does not exist. Anyone have any ideas what is going on? I think the ReportPath will need to be a fully-qualified path, not a relative one. Regards Stephen Bullen Microsoft MVP - Excel www.BMSLtd.co.uk |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
SaveAs and relative path
Thanks!
"Stephen Bullen" wrote in message ... Hi Dev, The SaveAs method fails because it is trying to save the workbook up 3 levels from the bin directory where Serial Worksheets does not exist. Anyone have any ideas what is going on? I think the ReportPath will need to be a fully-qualified path, not a relative one. Regards Stephen Bullen Microsoft MVP - Excel www.BMSLtd.co.uk |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Relative Path in Connection String | Excel Discussion (Misc queries) | |||
Relative Path to a Folder | Excel Discussion (Misc queries) | |||
how to change absolute path to relative path | Excel Worksheet Functions | |||
Absolute vs Relative path | Excel Discussion (Misc queries) | |||
relative path. | Excel Programming |