+ Reply to Thread
Results 1 to 5 of 5

Excel 2010 Activeworkbook.path

Hybrid View

  1. #1
    Registered User
    Join Date
    01-17-2014
    Location
    dax, france
    MS-Off Ver
    Excel 2007
    Posts
    4

    Excel 2010 Activeworkbook.path

    Hello,

    I have a problem with a workbook wich runs fine with Excel 2003 and Excel 2007.
    With Excel 2010 :

    in private sub Workbook_open()

    the instruction myPath=ActiveWorkbook.Path failes, in the debug mode, in the excecution window, il I put ? ActiveWorkbook.Path or ? ActiveWorkbook.name, I receive an error.

    I tried to redirect the sub in another one in modules, but same problem.

    I can imagine there is a security control but this file has just very few modification from the same I created last year, on the old one is ok and the new one doesn't work ....

    Thank you for an idea to test

    Launas

  2. #2
    Forum Expert Kenneth Hobson's Avatar
    Join Date
    02-05-2007
    Location
    Tecumseh, OK
    MS-Off Ver
    Office 365, Win10Home
    Posts
    2,573

    Re: Excel 2010 Activeworkbook.path

    Are you sure that you want to use ActiveWorkbook? That workbook could have no path. Most would use ThisWorkbook as it would always have a path after you save that file.

    I don't know what you mean by execution window. Maybe you mean the Immediate Window. It is where output from Debug.Print is sent. Of course putting code like this and pressing Enter key returns the value without the need for trying it in a code object like a Module.
    ?ThisWorkbook.Path

  3. #3
    Registered User
    Join Date
    01-17-2014
    Location
    dax, france
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Excel 2010 Activeworkbook.path

    Sorry it is the immediate window
    The result is the same with thisWorkbook.path

    Don't forget that it is ok with Excel 2003 and Excel 2007 and the last year file is also ok with Excel 2010

  4. #4
    Forum Expert Kenneth Hobson's Avatar
    Join Date
    02-05-2007
    Location
    Tecumseh, OK
    MS-Off Ver
    Office 365, Win10Home
    Posts
    2,573

    Re: Excel 2010 Activeworkbook.path

    If it is ok for 2003, 2007, and 2010, I am not sure what version is causing the problem.

    I don't see why it would fail. I don't have those versions installed on this computer to test. I just run 2010 here at work. Even if the file was not saved, it would just return a blank row in the Immediate window. I guess you could attach a simple workbook that duplicates the issue. You don't show it in your profile so I suppose you are not running a mac version. I don't do mac.

  5. #5
    Registered User
    Join Date
    01-17-2014
    Location
    dax, france
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Excel 2010 Activeworkbook.path

    It's ok will never know : the use agreed to declare the path in the approuved path and it's ok now.

    Thank you

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 1
    Last Post: 11-26-2013, 08:46 PM
  2. Replies: 2
    Last Post: 04-11-2012, 12:55 PM
  3. Get partial string from ActiveWorkBook.Path
    By Rick_Stanich in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-30-2009, 11:14 AM
  4. Different between ActiveWorkbook.Sheet and ActiveWorkbook.WorkSheets
    By Ranjani in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-02-2009, 12:56 AM
  5. xlDialogOpen.Show or Activeworkbook.Path?
    By Mike Echo in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-29-2005, 06:07 AM

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