+ Reply to Thread
Results 1 to 3 of 3

Method'OpenText' of object 'workbooks' failed

Hybrid View

jazbath Method'OpenText' of object... 11-13-2009, 02:11 PM
Richard Buttrey Re: Method'OpenText' of... 11-13-2009, 02:25 PM
jazbath Re: Method'OpenText' of... 11-13-2009, 02:41 PM
  1. #1
    Forum Contributor
    Join Date
    12-08-2005
    Location
    Silicon Valley, CA USA
    MS-Off Ver
    2013 - Using 64 bit system
    Posts
    275

    Method'OpenText' of object 'workbooks' failed

    Hi,
    I am getting the subject messsage when I run the following code:

    HTML Code: 
    the puzzling thing is that sometimes it works but most of the time it gives me that message. Any idea?
    Thanks for the help.
    Jaz

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Method'OpenText' of object 'workbooks' failed

    Perhaps the file name captured by the input box doesn't exist. You're at the mercy of idiosyncratic mis-spellings by the user.

    It's better to use the

    Workbooks.Open Filename:=Application.GetOpenFilename, etc.....
    which throws up the standard Windows file open dialog box for the user to navigate through.

    Rgds
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Contributor
    Join Date
    12-08-2005
    Location
    Silicon Valley, CA USA
    MS-Off Ver
    2013 - Using 64 bit system
    Posts
    275

    Re: Method'OpenText' of object 'workbooks' failed

    Hi Richard,
    Thank you for responding. I am using the method you mentioned which gets the open file window, but my point is why my previous code is not working, yes the file exist and I am typing the correct name.

    thanks
    Jaz

+ 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