Consulting

Results 1 to 3 of 3

Thread: Hyperlink problem

  1. #1

    Hyperlink problem

    I have 2 files in a network drive (Y)
    1.) I assign (in Macros.xlsm) a macro to a button in the other file (button.xlsm)
    2.) I make a hyperlink to the button.xlsm

    The Code in Macros.xlsm
    [VBA]
    Sub Test()
    ChDrive "Y" 'My network drive
    ChDir "Y:\temp"

    Workbooks.Open Filename:="Button.xlsm", UpdateLinks:=0
    Sheets("F").Shapes("M").OnAction = "Macros.xlsm!Copy"
    ActiveWorkbook.Close SaveChanges:=True

    Cells(1, 1).Select
    ActiveSheet.Hyperlinks.Add Anchor:=Selection, _
    Address:=CurDir + "\Button.xlsm", _
    TextToDisplay:=CurDir
    End Sub

    Sub Copy()
    Cells(1, 1) = "Success"
    End Sub

    [/VBA]

    If I open the button.xlsm
    1.) from Explorer, everythings works perfect, the macroassignment is:
    Macros.xlsm!Copy

    2.) trough the hyperlink, the macroassigment is:
    \\ganymede\infor\Temp\Macros.xlsm!Copy
    in the second case pushing the button, I get an error message: the macro in the file inaccessible or the macros are banned.

    I have to open my files trough hyperlink, what do I have to do.

    I am working with MS Server 2003, SP2. Excel 2010.

    I attached the files, if you want to test it, you have to open Macros.xlsm, and run Test.
    Thank you very much for your time and help!
    Attached Files Attached Files

  2. #2
    I am very sad, that nobody can or will help me. Without solving this problem, I can't fulfill my work. Please, your help or hint where to look for a solution would be really useful, you could spare sleepless nights for me.
    Thanks!

  3. #3
    It works perfect with Excel 2003, but not with 2010.

Posting Permissions

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