Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
File Names
I have one last issue to finish this project. I have a program that uses multipe excel workbooks, and macros that open and access these workbooks as needed. Where my difficulty comes in is in the way they are named in the macro
Example Workbooks.Open Filename:= "C:\Documents and Settings\The Competitive Edge\My Documents\Inventory_Program\Inventory.xls This works only if the person installs the program in that exact location - if not then the program can't find the file. I need to find a way, if possible, to make it so that I can reference it just from the single directory, so in this example it would be in "Inventory Program\Inventory.xls". All the workbooks that I use will be in this one directory, but all the rest depends on where it is installed on a specific computer I hope this makes since, any help would be greatly appreciated James |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
File Names
Is the workbook with the code in the same folder?
If yes, then you could use this fact: workbooks.open filename:=thisworkbook.path & "\" & "inventory.xls" James Stephens wrote: I have one last issue to finish this project. I have a program that uses multipe excel workbooks, and macros that open and access these workbooks as needed. Where my difficulty comes in is in the way they are named in the macro. Example: Workbooks.Open Filename:= _ "C:\Documents and Settings\The Competitive Edge\My Documents\Inventory_Program\Inventory.xls" This works only if the person installs the program in that exact location - if not then the program can't find the file. I need to find a way, if possible, to make it so that I can reference it just from the single directory, so in this example it would be in "Inventory Program\Inventory.xls". All the workbooks that I use will be in this one directory, but all the rest depends on where it is installed on a specific computer. I hope this makes since, any help would be greatly appreciated. James -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
File names | Excel Worksheet Functions | |||
Open Excel file get error with file names that have spaces in the | Setting up and Configuration of Excel | |||
File Names | Excel Worksheet Functions | |||
EXCEL97 FILE NAMES TRUNCATED TO THE FIRST LETTER IN THE FILE NAME | New Users to Excel | |||
File Names | Excel Worksheet Functions |