+ Reply to Thread
Results 1 to 2 of 2

Help with figuring out some code (not working properly)

  1. #1
    Registered User
    Join Date
    04-01-2005
    Posts
    29

    Help with figuring out some code (not working properly)

    Below is a pic of what I'm trying to update. The old version had a extra couple of tabs that were unnecessary so I got rid of them and tried to fix the code so that it would actually run. Well, it looks like I got most of it done (pretty good I think as I've never done this before).

    Anyway, the first tab works. If I select a file and click on open, the file opens up correctly. That's not the case with the second tab though. It does pick up the names and links for the tab but when I actually run the macro and try to select a link the macro does not find the requested file.

    Hopefully someone will notice what's wrong below. This is only part of the code. Figured it should be enough as it looks like its the part that works with the links etc. I'm thinking it's the "bTime = True" that is throwing it off but I'm not sure how to fix it. Before, it was at the part of the last tab section (4 tabs originally). I tried putting it after "Range("QA_Name").Select" but that didn't work.


    Private Sub cmdOK_Click()
    Dim iIndex As Integer, sLink As String, bTime As Boolean
    On Error GoTo er
    bTime = False
    Workbooks("Links.xls").Activate
    If sTab = "Templates / Macros" Then
    iIndex = lTEM.ListIndex
    Range("TEM_Name").Select
    Range(Selection, Selection.End(xlDown)).Select
    bTime = True
    ElseIf sTab = "Q & A" Then
    iIndex = lQA.ListIndex
    Range("QA_Name").Select
    End If
    sLink = ActiveCell.Offset(iIndex, 1).Value
    ActiveWorkbook.FollowHyperlink Address:=sLink, NewWindow:=True
    Unload Me
    If bTime = True Then
    MsgBox "Please Remember to Log into TimeSharing!", , "Links"
    End If
    Exit Sub
    er:
    MsgBox "Link was not Located", vbExclamation, "Factset Links"
    End Sub
    Attached Images Attached Images

  2. #2
    Registered User
    Join Date
    04-01-2005
    Posts
    29
    bump...anyone?

+ 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