VBA MacroOptions HelpFile - redirect to webpage

be_savvy

New Member
Joined
Sep 23, 2014
Messages
6
Hi, I have an excel User Defined Function (UDF) in Excel 2010 and want to redirect the 'Help on this function' hyperlink in the function wizard to a webpage. I used the MacroOptions to set up the function description and parameter descriptions and now would like to set up the help. The function is already documented on a webpage, so I'd prefer linking to the webpage instead of creating the HXS files that are sure to be abandoned by Microsoft in the very near future. My code looks like this:


Code:
Sub RegisterFunction()
    Dim vArgDescr(1 To 7) As Variant
    
    vArgDescr(1) = "Test1"
    vArgDescr(2) = "Test2"
    vArgDescr(3) = "Test3"
    vArgDescr(4) = "Test4"
    vArgDescr(5) = "Test5"
    vArgDescr(6) = "Test6"
    vArgDescr(7) = "Test7"
    
    Application.MacroOptions _
                             Macro:="TestFunction", Description:="Function used for testing MacroOptions", _
                             Category:="TestCat", _
                             ArgumentDescriptions:=vArgDescr, HelpFile:="http://www.google.com/"
End Sub

When I compile and then try the function and click the hyperlink, it just takes me to the general Excel Help, which is a slight improvement over showing a dialog box with 'No Help Available', but still not ideal. Any ideas?

Thanks,
Brian
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
Hi, I have an excel User Defined Function (UDF) in Excel 2010 and want to redirect the 'Help on this function' hyperlink in the function wizard to a webpage. I used the MacroOptions to set up the function description and parameter descriptions and now would like to set up the help. The function is already documented on a webpage, so I'd prefer linking to the webpage instead of creating the HXS files that are sure to be abandoned by Microsoft in the very near future. My code looks like this:


Code:
Sub RegisterFunction()
    Dim vArgDescr(1 To 7) As Variant
    
    vArgDescr(1) = "Test1"
    vArgDescr(2) = "Test2"
    vArgDescr(3) = "Test3"
    vArgDescr(4) = "Test4"
    vArgDescr(5) = "Test5"
    vArgDescr(6) = "Test6"
    vArgDescr(7) = "Test7"
    
    Application.MacroOptions _
                             Macro:="TestFunction", Description:="Function used for testing MacroOptions", _
                             Category:="TestCat", _
                             ArgumentDescriptions:=vArgDescr, HelpFile:="http://www.google.com/"
End Sub

When I compile and then try the function and click the hyperlink, it just takes me to the general Excel Help, which is a slight improvement over showing a dialog box with 'No Help Available', but still not ideal. Any ideas?

Thanks,
Brian

Hi Brian
I've wanted to be able to do this for ages. No dice. So I put in a request at Excel User Voice. Please add your vote to my request - you never know, MS might listen....
Vote here: https://excel.uservoice.com/forums/...ooptions-to-redirect-help-for-vba-udfs-to-web

Regards
Philip
 
Upvote 0
I'm not positive but I don't think this is an example of a UDF. This looks like a Sub Procedure. UDF syntax typically looks like this:

Code:
[COLOR=#0000ff]Function [/COLOR]Register()

[COLOR=#006400]'Function Code[/COLOR]


[COLOR=#0000ff]End Function[/COLOR]
 
Upvote 0
Thanks PG1962 - I added my vote.

mrmmickle1, The code I posted is just the subroutine I created to register each of my UDFs. It needs to be a subroutine so that it executes upon Excel opening - I am not calling a function to Sorry for not clarifying that. The subroutine does what I need it to, with the exception of redirecting the hyperlink to a URL.
 
Upvote 0

Forum statistics

Threads
1,223,643
Messages
6,173,515
Members
452,518
Latest member
SoerenB

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top