Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Page 4 of 4 FirstFirst ... 234
Results 31 to 33 of 33

Thread: spreadsheet Links

  1. #31
    Legend NateO's Avatar
    Join Date
    Feb 2002
    Location
    Minneapolis, Mn, USA
    Posts
    9,700
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    No need to be sorry, we can lick this.

    Not Chris' forte per his post:

    ahh, yes, ermmm, physically opening a file based on a cell content needs some VBA coding
    , and this means a different type of genius....
    Which code did you try (see my last post)? Do prefer a set up which requires opening the workbook or one that works with closed workbooks?

    Does B1 Chris' formula? It's possible we can get this to fire but vba code will be essential one way or another.

    _________________
    Cheers, NateO

    [ This Message was edited by: nateo on 2002-05-13 14:57 ]

  2. #32
    Board Regular
    Join Date
    Apr 2002
    Posts
    765
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Hi Nate
    No error messages

    Chris's code is in B4 and I've changed the references in the VB accordingly (remember Chris's code is going to be in a range of cells on each sheet)

    Don't mind if the workbook is opened automatically on selection or I suppose it would be better if it worked with closed workbooks. depends upon the complexity of the code required.

    [ This Message was edited by: Peter100 on 2002-05-13 15:05 ]

  3. #33
    Legend NateO's Avatar
    Join Date
    Feb 2002
    Location
    Minneapolis, Mn, USA
    Posts
    9,700
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    You only need to reference one of the formulae, so I'd use this:


    Private Sub Worksheet_Change(ByVal Target As Range)
    'Macro recorded by Nate
    Dim o As Integer, s As Integer
    Dim z As String
    If Target.Address = "$A$1" Then
    o = InStr([b4].Formula, "[")
    s = InStr([b4].Formula, "]")
    ChDrive ("C") 'hardcode your target drive letter
    ChDir ("C:tempxltest") 'hardcode your target file path
    z = Application.Substitute(Mid([b4].Formula, _
    o + 1, s - 1 - o), ".xls", "") & ".xls"
    Workbooks.Open [a1].Value & Application.Substitute(z, _
    """&$A$1&""", "")
    End If
    End Sub


    If you get no reaction from this, go into a normal module (in any workbook) and run the following code:


    sub st()
    application.enableevents = true
    end sub


    Then try again. Hope this helps. If not let us know.

    _________________
    Cheers, NateO

    [ This Message was edited by: NateO on 2002-05-13 15:06 ]

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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