Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Hyperlink in Excel
#1
How can I set a hyperlink in a cell of excel?

Example:
Address="http://www.quickmacros.com"
TextToDisplay="Link1"
cell=B3
#2
Code:
Copy      Help
function ~link ~text column row
;EXAMPLE
;ExcelSheet es.Init
;es.Hyperlink("http://www.google.es" "link" 5 3)



if(!ws) Init
Excel.Range r=ws.Cells.Item(row column)
r.Select
BSTR ad=link
VARIANT t=text
ws.Hyperlinks.Add(ws.Application.Selection ad @ @ t)
#3
How can I insert in a cell a hyperlink to a QM macro?
#4
When hyperlink is qm command line, it does not work?
#5
It can execute [qmcl.exe] but not [qmcl.exe M "Macro4"]
#6
Can use shortcut file.
But Excel shows 2 security warning msgboxes before running the file.
#7
Ok. Thanks.
#8
Can register custom URL protocol to run QM macros.

Macro qm protocol register
Code:
Copy      Help
;Registers custom URL protocol to run QM macros.
;Then you can run QM macros from:
;;;Windows 'Run' dialog and some programs:  qm:macro name
;;;Hyperlinks:  <a href="qm:macro name">link text</a>


if(!IsUserAdmin) mes- "QM must be running as administrator." "" "x"
rset "URL:QM Protocol" "" "qm" HKEY_CLASSES_ROOT
rset "" "URL Protocol" "qm" HKEY_CLASSES_ROOT
rset "qmcl.exe M ''qm_protocol_handler'' C %1" "" "qm\shell\open\command" HKEY_CLASSES_ROOT

Function qm_protocol_handler
Code:
Copy      Help
str s=_command+3
s.escape(8) ;;sometimes command is urlencoded, eg from firefox
;out s
mac s
err+

-----------

Shows only 1 warning in Excel.
In web browsers, shows warning only first time.


Forum Jump:


Users browsing this thread: 2 Guest(s)