lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Have you tried with:

excel.Selection.Hyperlinks:Add({Anchor = excel.Selection, Address="http://www.bbc.co.uk/", TextToDisplay="BBC"} )

Anyway, if that fails (which probably will), you can take a look at the definition of the Add method (ActiveSheed.Hyperlinks.Add) using OleView, as suggested earlier.

That's because you are using named parameters, and I don't recall how LuaCom deals with those. 
Named parameters are like a "shortcut" were you don't need to provide all arguments to a function if some of them are optional.
For instance, this function (not related to Excel)

HRESULT StartRecording(
                        [in] BSTR Path, 
                        [in, optional, defaultvalue(0)] short Width, 
                        [in, optional, defaultvalue(0)] short Height, 
                        [in, optional, defaultvalue(0)] short FrameRate);

Could be invoked as StartRecording( Path="something", FrameRate=30 )
But, with LuaCom, you might need to invoke it passing nils for the arguments not provided.

StartRecording( "something", nil, nil, FrameRate=30 )


Hope that helps.