I hate paths

I have prepared a spreadsheet that has a macro(recorded) in it that when
invoked, opens another excel file.
Here is that code:
 Workbooks.Open Filename:= _
        "C:\Documents and Settings\Ross D\My
Documents\AURORA\jimspreada1.xls"

I plan to distribute these sheets to various other employees at my agency
for their use.  Both files will always be in the same directory -- however,
a different directory on each person's machine.  How do I change the above
code to open that file in the current directoy, whatever that directory
might be?
Ross



0
ssor (40)
4/4/2007 9:06:23 PM
excel 39879 articles. 2 followers. Follow

3 Replies
387 Views

Similar Articles

[PageSpeed] 11

You can use Thisworkbook.Path Ross

-- 

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Ross" <ssor@twcny.rr.com> wrote in message news:46141341$0$19455$4c368faf@roadrunner.com...
>I have prepared a spreadsheet that has a macro(recorded) in it that when
> invoked, opens another excel file.
> Here is that code:
> Workbooks.Open Filename:= _
>        "C:\Documents and Settings\Ross D\My
> Documents\AURORA\jimspreada1.xls"
> 
> I plan to distribute these sheets to various other employees at my agency
> for their use.  Both files will always be in the same directory -- however,
> a different directory on each person's machine.  How do I change the above
> code to open that file in the current directoy, whatever that directory
> might be?
> Ross
> 
> 
>
0
rondebruin (3789)
4/4/2007 9:13:56 PM
Haven't we been here before?

Workbooks.Open Filename:= "jimspreada1.xls"

-- 
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Ross" <ssor@twcny.rr.com> wrote in message 
news:46141341$0$19455$4c368faf@roadrunner.com...
>I have prepared a spreadsheet that has a macro(recorded) in it that when
> invoked, opens another excel file.
> Here is that code:
> Workbooks.Open Filename:= _
>        "C:\Documents and Settings\Ross D\My
> Documents\AURORA\jimspreada1.xls"
>
> I plan to distribute these sheets to various other employees at my agency
> for their use.  Both files will always be in the same directory --  
> however,
> a different directory on each person's machine.  How do I change the above
> code to open that file in the current directoy, whatever that directory
> might be?
> Ross
>
>
> 


0
bob.NGs1 (1661)
4/4/2007 9:17:35 PM
There should be a common description of the path that will be available to 
all, eg. GA123gg6\apps

You should be able to see that in Windows Explorer or you may have to ask IT 
for help.  If you can establish that common path description, you will have 
no problems.
-- 
Best wishes,

Jim


"Bob Phillips" wrote:

> Haven't we been here before?
> 
> Workbooks.Open Filename:= "jimspreada1.xls"
> 
> -- 
> ---
> HTH
> 
> Bob
> 
> (there's no email, no snail mail, but somewhere should be gmail in my addy)
> 
> 
> 
> "Ross" <ssor@twcny.rr.com> wrote in message 
> news:46141341$0$19455$4c368faf@roadrunner.com...
> >I have prepared a spreadsheet that has a macro(recorded) in it that when
> > invoked, opens another excel file.
> > Here is that code:
> > Workbooks.Open Filename:= _
> >        "C:\Documents and Settings\Ross D\My
> > Documents\AURORA\jimspreada1.xls"
> >
> > I plan to distribute these sheets to various other employees at my agency
> > for their use.  Both files will always be in the same directory --  
> > however,
> > a different directory on each person's machine.  How do I change the above
> > code to open that file in the current directoy, whatever that directory
> > might be?
> > Ross
> >
> >
> > 
> 
> 
> 
0
JimJackson (21)
4/5/2007 12:34:02 PM
Reply:

Similar Artilces:

save as path
is there a way to change the path excel points to when i click save as. i want it to default to a network folder always Do a ChDir and ChDrive. -- HTH RP (remove nothere from the email address if mailing direct) "kevin" <kevin@discussions.microsoft.com> wrote in message news:5FDEB6A1-FE20-4BC5-80F1-2AEB0C0B50AB@microsoft.com... > is there a way to change the path excel points to when i click save as. i > want it to default to a network folder always ...

I should hate me but
Everytime I send out an email it comes back undeliverable with: Maxium receipt headers exceeded (possible mail loop). ??? Thanks Hi Brian, Its may be DNS isn't properly configured or someone has made an inappropriate change to the IMS. Eli Shlomo Exchange Group Eli_shl@bezeqint.net "BrianMultilLanguage" wrote: > Everytime I send out an email it comes back undeliverable with: > Maxium receipt headers exceeded (possible mail loop). > ??? > Thanks > > > "BrianMultilLanguage" <brian@clilang.com> wrote: >Everytime I send out an emai...

Who hates Office 2007? And why did you switch?
I switched and hate it. The menus are all wrong. Takes too long to learn where everything is. Don't see any speed improvements over 2003. Why did I switch? I guess because I felt it would be an improvement. RL And it took even LONGER with the old menu system. RayLopez99 wrote: > I switched and hate it. The menus are all wrong. Takes too long to > learn where everything is. Don't see any speed improvements over > 2003. > > Why did I switch? I guess because I felt it would be an improvement. > > RL On Dec 15, 1:15=A0pm, Bob I <bir...

Re: Path in footer
Not sure if this works in all versions but try &[path] Regards G --------------= Posted using GrabIt =---------------- ------= Binary Usenet downloading made easy =--------- -= Get GrabIt for free from http://www.shemes.com/ =- ...

How to use CFtpFileFind to search a file which contains space in its file path?
How to use CFtpFileFind to search a file which contains space in its file path? For example, suppose that the file path is "/a b/a.txt;how to use CFtpFileFind to search it and make sure the result returns as true? The reason that I am asking this question is that the search result for a file that contains space in its file path always returns as false even I do know the file exits. I do not know the reasons. Is there anyone who had the same experience? Any comments will be highly appreciated. By the way, the searching environment is vc.net ,win2000 professional. ...

Integration Manager does not install
I have a workstation that has previously had multiple installs of Dyn GP 10. Now I want to install Integration Manager and it bombs out because it can not find a path. How can I wipe all Dynamics install and registry settings so I can start with a clean slate. I don't want to re-image my PC! Thanks! Joshua, Before you perform such a time consuming task, why don't you check the following: 1) Open the Registry Editor. Go to Start > Run and type in REGEDIT. 2) Navigate to HKLM > Software > Microsoft > Business Solutions > Great Plains > 1033 > Default &g...

Paths to becoming an Excel Expert
Dear community I am a retired accountant, and have used Excel for many years, including power user, macro and VBA development. I would like to specialise in this field + maybe delivering Excel training, maybe offering my services as a freelance. What is the best path to develop this expertise? Is there a worthwhile Microsoft Certification route - which I find confusing? And finally is it worth sticking with VBA which seems to be on the back burner now? Thanks for any suggestions. First, some links to several "Excel Experts" www.chandoo.org www.peltiertech.co...

Path\File name length problem Excel Crash on save as
I have a problem saving a file in code using: thisworkbook.SaveAs The problem is if the file and path length is greater than 150 then the Excel app crashes. I have tried this over a network as well as a local drive. Has anyone ever seen this problem? Thanks in advance, Stewart Rogers ...

If I get 'access denied' one more time with Vista I am going to go to Linux : I hate Vista, I despise Vista. I absolutely hate Vista!
From a 17 year user of windows. I no longer trust Microsoft and will not buy Windows 7, maybe never. "U S Army Veteran" <someone@gmail.com> wrote in message news:O7Wdnfh2e4m3HYPWnZ2dnUVZ_tWdnZ2d@giganews.com... > From a 17 year user of windows. I no longer trust Microsoft and will not > buy Windows 7, maybe never. Sounds like you are too stupid to use Windows. You are a perfect candidate for that crappy Ubuntu. Get with Alias, he will be happy to get another user. Don't let the screen door hit your ass on the way out On Tue, 08 Dec 2...

default path
help,, whenever i open an excel file the excel application open but my document does not, i am forced to search for the excdl doc again and then it opens,, is there a problem with my default paths, im on xp... thanks,, bryan You have a response at your first post. bryan wrote: > > help,, > > whenever i open an excel file the excel application open > but my document does not, i am forced to search for the > excdl doc again and then it opens,, > > is there a problem with my default paths, im on xp... > > thanks,, > > bryan -- Dave Peterson ec35...

DLL Path in Visual Studio 2008 Orcas
Dear Team, I have a custom build library that whose functions are to be called in the application. I included the library path and called the exported functions. The project compiles successfully but at the run time I get a message that required dll is not found. If I copy the dll to the current project working directory, it is recognizing and executing normally. In the project properties, I tried to include the path of dll but could not find the exact field where I need to mention the path. Anyone who is working on Visual Studio 2008 Orcas, kindly provide a pointer to the field where I...

incorrect paths
While in the computer management window, under Services and Applicaqtions\Internet Information Service\Web Sites\Default Web site. I was checking out my Exchange 2003 Exadmin, Exchange, Public folders and a message poped up and said, " the system cannot find the path specified." The path is \\.\Backofficestorage\ My Exchange server seems to be running properly. What did I wrong ? Is there a problem that I am not aware of? Mark3803 "Mark3803" <mark3803@yahoo.com> wrote: >While in the computer management window, under Services >and Applicaqtions\Inter...

Get full path directory list on both recursive and non-recursive dir command
This post could easily be titled "Why Unix is so much better than Windows", but that would likely ruffle a few feathers... I have the following seemingly simple requirements: 1) Directory list of *.foo files, recursive to a particular root directory 2) Directory list of *.foo files, in the root directory only The list has to be returned as a full path to the files. What works (returns full path) 1) dir "C:\Path\To\My\Files\*.foo" /b /s What fails (returns filename only) 2) dir "C:\Path\To\My\Files\*.foo" /b I've also investigated t...

Path and filename in every Excel workbook
Hi I want to insert the full path and filename of the workbook into the footer, but as I've looked around and can only find solutions where I have to insert a macro into every workbook I use. That is to much work. To put it in another way: I want the path and filname to be inserted without me having to do anything at all, only print or save the document Hope anyone can help me Thank you in advance Andreas Hi Andreas AFAIK the macro solution is the only way to go. Until MS decides to include this functionality in Excel directly Frank Andreas Indahl wrote: > Hi, > > I want to...

I Hate Attachment Icons!!!
When i send a new message to someone with an attachment, the attachment appears as a icon in the middle of my email, wherever my cursor happens to be at the time. I hate the attachment icons. I want my attachments to appear in the attachment Field below the To, Cc, and Subject fields above the message body field. Can someone please tell me how to do this???? Also, when i startup Outlook, a pop up window appears and asks me for my user name, domain, and password everytime. Can i set this so that my outlook automatically uses this information to sign me on whenever i start it up...

Hate having to press save just to update cells
I am not sure how this happened. I have been working in the same file for a long time but now all of the sudden, cells won't update until I hit save. Is there a way to fix this. I have a huge file and it is such a pain to wait 10 seconds every time I want to see the calculation appear. ** Posted via: http://www.ozgrid.com Excel Templates, Training, Add-ins & Software! http://www.ozgrid.com/Services/excel-software-categories.htm ** Check if your calculation is still set to auto. <Tools> <Options> <Calculation> tab, Make sure "Automatic" is checked under...

Dialog to select a folder path similar to CFileDialog
There are some dialog to select a folder path similar to CFileDialog. With CFileDialog we can select a file. But I want select a folder. Tks. Rui "Rui Oliveira" <RuiOliveira@discussions.microsoft.com> wrote in message news:25BC259D-1A7B-4269-8E43-C924DB44BD80@microsoft.com... > There are some dialog to select a folder path similar to CFileDialog. > > With CFileDialog we can select a file. But I want select a folder. SHBrowseForFolder? Seriously tedious to use mind. -- Tim Ward Brett Ward Limited - www.brettward.co.uk Have a look here: http://www.codeguru.com/...

How to set the path
How to set the path in win XP with System > Environment Variables. existing is %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem I need add F:\Source\bin and F:\Source2\code anime wrote: > How to set the path in win XP with System > Environment Variables. > existing is > %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem > > I need add F:\Source\bin and F:\Source2\code Just edit and add it to the path at the same place, insert semi-colons between the different paths: %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;...

"Illegal characters in path" with XmlReader of .Net 1.1
I only found one post on Google where someone mentions the same problem with a DataSet: XmlDataReader in .Net 1.1 can not read XML files from a path which contains "%10" or "%3f". code to reproduce: string filename = "%10.xml"; //XML file with this name is existing XmlReader reader = new XmlTextReader(filename); reader.Read(); this will throw an System.ArgumentException: "Illegal characters in path." at System.IO.Path.CheckInvalidPathChars(String path) at System.IO.Path.GetFileName(String path) at System.IO.FileStream..ctor(String path,...

File paths (UNC, mapped drives, etc.) in a client-server environment, how to?
Hi, I have an app that needs to run in a client-server environment. That is, the app (MFC native) is installed on multiple workstations and accesses a database on a 'server'. The app stores media file paths (video, audio, images, etc.) in the database. These files need to be played on any workstation running the app as well as on the server. In addition, I also have a Web app (asp.net 3.5) that needs to access the media files and display them in a Web page. The app was initially designed to work on a single computer. I need to make some changes so it could functi...

I hate paths
I have prepared a spreadsheet that has a macro(recorded) in it that when invoked, opens another excel file. Here is that code: Workbooks.Open Filename:= _ "C:\Documents and Settings\Ross D\My Documents\AURORA\jimspreada1.xls" I plan to distribute these sheets to various other employees at my agency for their use. Both files will always be in the same directory -- however, a different directory on each person's machine. How do I change the above code to open that file in the current directoy, whatever that directory might be? Ross You can use Thisworkbook.Path Ross...

How do get a path name from a cell?
Greetings, I have a macro that needs a file (from an inactive workbook) calle �data123.xls�; but my users move this file pretty much where ever the want on their PC. Is there a way to have the user fill out cell A1 (Sheet1) with the pat name (e.g. �C:\My Documents\ACME�) and have the macro search for the xl file according to the cell patch name given by the user? Appreciate any hel -- Fabl ----------------------------------------------------------------------- Fable's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=218 View this thread: http://www.excelforum....

Exception in fetching stencil paths
Hi All! I am developing a VC++ project for automating MS-Visio 2003, when i am trying to get stencil paths using function GetStencilPaths(), i have following error: COleException. SCODE: 800706ba. I am working on Windows-XP (SP2), Visual Studio 6.0 and Visio-2003. I am using following code to automate Visio: // *************************************************************************** *************************** CLSID visio_clsid= { 0x00021a20, 0x0000, 0x0000, { 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46 } }; IUnknown *pUnk= NULL; IVApplication app; GetActiveObject(visio_clsid, NULL, &...

Alternative Path
Here's an alternative path: 1) Spin the product and back end infrastructure out into a venture startup, give it some money (real cash I mean) and lend it product expertise for two years. 2) Get some VC's to invest and go to every major financial provider and ask them to invest (Fidelity, Chase, Vanguard, BofA, Wells, etc.). 3) The newco charges more for the product and for the back end services. I personally would pay something up to $1,000 a year in combination. 4) Eventually transition it to a web service when cloud computing, etc. is more mature/secure/etc. with a monthly subs...

I HATE THREADS
Not really; It's just that I guess I am too stupid to figure them out. I have a communications app that has 2 threads for Send and Receive. I've worked and worked and debugged to try and get the logic right to handle closing the app and the com port logically so as not to get hung. I use PostMessage() in the threads so as not to get stuck when sending a message to the app in case is't closing down. However my current problem does not occur when closing the app but during an OnTimer() message in which case I detect that the device on the com port has stopped responding. When t...