Results 1 to 4 of 4
  1. #1
    Lounger
    Join Date
    Mar 2002
    Posts
    34
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Hyperlink use? (Excel 2002)

    I have a program that opens Excel, dumps logged data into it, prints and saves the file, then closes Excel. Given a certain cell condition during this process I would like Excel to open a wave or .doc file as an alert. The Hyperlink function seems to be what I need but I'm unable to put it into an If/Then statement. Does someone have a suggestion on how I can accomplish my original task, with or without the Hyperlink function?

  2. #2
    Bronze Lounger
    Join Date
    Jun 2001
    Location
    New York, New York, Lebanon
    Posts
    1,449
    Thanks
    1
    Thanked 1 Time in 1 Post

    Re: Hyperlink use? (Excel 2002)

    <img src=/S/hello.gif border=0 alt=hello width=25 height=29> Chas1

    Sorry for being so hard on you today, but I ask you why so complicated?! <img src=/S/bash.gif border=0 alt=bash width=35 height=39>

    Have you heard of a Message Box? It is bulit-in and very easy to use.

    Now if you are saying you want an alert, then MsgBox is the way to go, if you want to open a document, well that is something else.

    BTW working with hyerlinks is not without trouble. Try and use them sparingly.

    Wassim <img src=/S/compute.gif border=0 alt=compute width=40 height=20>
    <img src=/S/compute.gif border=0 alt=compute width=40 height=20> in the <img src=/S/bagged.gif border=0 alt=bagged width=22 height=22>

  3. #3
    Lounger
    Join Date
    Mar 2002
    Posts
    34
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Hyperlink use? (Excel 2002)

    It's OK. I'm thick-skinned. The terminal is not manned at all times. I'll try the message box but was under the impression it would close when Excel closed and therefore could be missed.
    Thanks for the help. I'm only familiar enough with Excel to get into trouble.

  4. #4
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Dublin, Ireland, Republic of
    Posts
    2,697
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Hyperlink use? (Excel 2002)

    The following should work,<pre>If Range("A1") = 100 Then
    ActiveWorkbook.FollowHyperlink _
    Address:="C:WindowsMediaNotify.wav"
    End If</pre>


    That example plays a wav file if A1 = 100. If you want to dispaly a document, just change the path & filename to point to the file you want.

    If hyperlinks do cause problems, there is a ShellExecute API that would have the same functionality.

    Andrew C

Posting Permissions

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