+ Reply to Thread
Results 1 to 2 of 2

2003 version of excel has no path default setup for importing dat.

  1. #1
    BEAN
    Guest

    2003 version of excel has no path default setup for importing dat.

    2000 version of Excel had a default path for importing data & open files &
    xml but
    the 2003 version of excel does not go to the default path when importing data.
    it always goes to my data subdirectory under C: drive instead of the default
    path
    that is set up under tools/general. Could the 2003 version be set up so
    importing
    external data defaults to the default working folder??????
    Thanks for you help.
    Gene Rose


    ----------------
    This post is a suggestion for Microsoft, and Microsoft responds to the
    suggestions with the most votes. To vote for this suggestion, click the "I
    Agree" button in the message pane. If you do not see the button, follow this
    link to open the suggestion in the Microsoft Web-based Newsreader and then
    click "I Agree" in the message pane.

    http://www.microsoft.com/office/comm...el.programming

  2. #2
    MentalDrow
    Guest

    RE: 2003 version of excel has no path default setup for importing dat.

    BEAN,

    Are you wanting to open files where the file name(s) change? If not you can
    hard code the path\file into the macro. If the name of the file you're
    importing Does change, you can code in a way to have a file browser window
    open so you can file the file that way and the path will be saved as part of
    the variable. I will also include the coding to strip the path out if you
    need to use just the file name without the path to it. I use this method to
    save the file once I'm done with it and to activate the workbook when I need
    to without having to make the whole thing one giant macro.
    *************************
    Public OpenFile
    *************************
    Sub FindTheFile_Click()
    'Open a file browser so the User can find the file and then open the file'
    Application.AutomationSecurity = msoAutomationSecurityByUI
    FileToOpen = Application _
    .GetOpenFilename("Excel Workbooks Files (*.xls), *.xls")
    If FileToOpen <> False Then
    Workbooks.Open (FileToOpen)
    End If
    'Strips the file path from the file leaving just the file name for future
    use (if you put the "OpenFile" variable in the Public Area)
    OpenFile = Right(FileToOpen, Len(FileToOpen) - InStrRev(FileToOpen, "\"))
    End Sub

    This routine actually opens the file as a separate file but can be modified
    to import the data from the opened file instead.

    "BEAN" wrote:

    > 2000 version of Excel had a default path for importing data & open files &
    > xml but
    > the 2003 version of excel does not go to the default path when importing data.
    > it always goes to my data subdirectory under C: drive instead of the default
    > path
    > that is set up under tools/general. Could the 2003 version be set up so
    > importing
    > external data defaults to the default working folder??????
    > Thanks for you help.
    > Gene Rose
    >
    >
    > ----------------
    > This post is a suggestion for Microsoft, and Microsoft responds to the
    > suggestions with the most votes. To vote for this suggestion, click the "I
    > Agree" button in the message pane. If you do not see the button, follow this
    > link to open the suggestion in the Microsoft Web-based Newsreader and then
    > click "I Agree" in the message pane.
    >
    > http://www.microsoft.com/office/comm...el.programming


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1