Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I'm often coping Number from external program and then I paste it into QV to make selection based on that Number, of course MultiBox gives such possibility - but it's little complex - first open correct field, then start seraching, enter etc..
it would be nice to have 1 button - to read Number from Clipboard & select result for specific Number
It may look like:
Sub SelectNumber
I've digged into QlikWeb API - unfortunately - no idea how can I read text from CLIPBOARD,
Thanks for your help, duhu
ActiveDocument.Fields("Number").Select ("*" & "text from CLIPBOARD" & "*")
End Sub
Hi,
a suggestion would be this VBScript code:
sub Clip
Set ClipBoard = CreateObject("WScript.Shell")
Set ListBox = ActiveDocument.GetSheetObject("LB01")
ListBox.ShowSearchDialog 0
ClipBoard.SendKeys "^V"
end sub
This opens the search dialog for the list box "LB01" and by SendKeys it pastes the clipboard contents in there (Ctrl-V).
Just for clarification: there seems to be no possibility to access clipboard directly, neither in VBScript nor in JScript, I just used the object name ClipBoard. You can name it any way you want.
Rgds,
Joachim
Thank you, works perfect,
frankly speaking worked perfect yesterday evening - and today I have error:
ActiveX component can't create object: 'WScript.Shell'
so I have to dig deeper..
many thanks sduhu
I'm fairly sure this is due to security settings ("Limit macros to safe mode") or so. Check security settings in the module as well as with Ctrl-Shift-M. Pretty sure that's the reason why Wscript.Shell can't be created (ActiveX blocked - not safe enough;-).
Rgds,
Joachim