+ Reply to Thread
Results 1 to 3 of 3

VBA link to another spreadsheet throws RTE 1004 if file is in use

  1. #1
    Registered User
    Join Date
    09-05-2005
    Location
    Basingstoke, England
    MS-Off Ver
    2003
    Posts
    86

    VBA link to another spreadsheet throws RTE 1004 if file is in use

    Hello, looking for some guidance with links to other excel spreadsheets. I have been asked to compile a 'dashboard' that simplifies searching for files by having hyperlinks to them all in one place. This seemed easy enough and entered simple code for each command button, what I did not account for whether anyone else on the network would be using any of the files. If indeed they are VBA throws up a RTE 1004 error (Select Method Of Worksheet Class Failed) but I would simply like it to let users choose as they would normally (when excel reports file is locked for editing) to open read only/notify/cancel as normal.

    Here is the basic code for the buttons;
    Please Login or Register  to view this content.
    What could I add so that if indeed a file is in use the code would offer me the same options as if I was opening the file directly?

    Edit: By just putting a plain hyperlink into a cell will open up the targetted workbooks without a problem so that is why I am confused as to why it is not opening via VBA?

    Many thanks.
    Last edited by Ducatisto; 10-01-2010 at 06:38 AM. Reason: More info

  2. #2
    Registered User
    Join Date
    09-05-2005
    Location
    Basingstoke, England
    MS-Off Ver
    2003
    Posts
    86

    Re: VBA link to another spreadsheet throws RTE 1004 if file is in use

    I have searched high and low and there does not seem to be a definitive answer to my problem with VBA hyperlinks. As per my first post I added plain hyperlinks into a cell and it worked as wanted but hyperlinking via VBA threw up the error. Reasons behind the use of VBA and comand buttons was to have a neat interface for end users. Any thoughts on this? I am sure I cannot be the only person to have or had this problem.

  3. #3
    Registered User
    Join Date
    09-05-2005
    Location
    Basingstoke, England
    MS-Off Ver
    2003
    Posts
    86

    Re: VBA link to another spreadsheet throws RTE 1004 if file is in use

    I have revisited my workbook having hoped I would have found a resolution but alas no. Can anyone put a pointer as to why a hyperlink associated with a command button would fail and not as a simple hyperlink? The only other information I can give is that the workbooks I am trying to access do have macro security warnings but that is all.

    I was hoping to use buttons as it did make the workbook a lot neater and professional than plain hyperlinks.

    I would dearly like a pointer to this, many thanks.

+ 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