Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming,microsoft.public.word.vba.general
|
|||
|
|||
Get text from clipboard
Can anyone help me on this one please.
I am creating a inputbox and I want the default text of the inputbox to be the text I just copied. Dim Search Search = InputBox("Type your search", "Search", CLIPBOARDTEXTHERE) Thanks, Rene |
#2
Posted to microsoft.public.excel.programming,microsoft.public.word.vba.general
|
|||
|
|||
Get text from clipboard
you can use SendKeys Range("A1").Copy Application.SendKeys "^V" Search = InputBox("Type your search", "Search") -- 天行健,君*以自強不息 地勢坤,君*以厚德載物 http://www.vba.com.tw/plog/ "Rene Petersen" wrote: Can anyone help me on this one please. I am creating a inputbox and I want the default text of the inputbox to be the text I just copied. Dim Search Search = InputBox("Type your search", "Search", CLIPBOARDTEXTHERE) Thanks, Rene |
#3
Posted to microsoft.public.excel.programming,microsoft.public.word.vba.general
|
|||
|
|||
Get text from clipboard
You mihgt want to look at the DataObject in the MSForms 2.0 library:
http://www.cpearson.com/excel/clipboar.htm Assumes you have copied a text string to the clipboard. -- Regards, Tom Ogilvy "Rene Petersen" wrote in message ... Can anyone help me on this one please. I am creating a inputbox and I want the default text of the inputbox to be the text I just copied. Dim Search Search = InputBox("Type your search", "Search", CLIPBOARDTEXTHERE) Thanks, Rene |
#4
Posted to microsoft.public.excel.programming,microsoft.public.word.vba.general
|
|||
|
|||
Get text from clipboard
Have you just copied the text in code yourself? Or are you relying on the
user having done it? If you've done it on code, you should already know what you've copied. If you're relying on the user you will have to allow for the fact that they may not have done it and the clipboard may be empty or may contain non-textual data (but the DataObject is still probably the thing to use). -- Enjoy, Tony "Rene Petersen" wrote in message ... Can anyone help me on this one please. I am creating a inputbox and I want the default text of the inputbox to be the text I just copied. Dim Search Search = InputBox("Type your search", "Search", CLIPBOARDTEXTHERE) Thanks, Rene |
#5
Posted to microsoft.public.excel.programming,microsoft.public.word.vba.general
|
|||
|
|||
Get text from clipboard
See the article "Manipulating the clipboard using VBA" at:
http://www.word.mvps.org/FAQs/Macros...eClipboard.htm -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP "Rene Petersen" wrote in message ... Can anyone help me on this one please. I am creating a inputbox and I want the default text of the inputbox to be the text I just copied. Dim Search Search = InputBox("Type your search", "Search", CLIPBOARDTEXTHERE) Thanks, Rene |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Pasting from clipboard-how to control text-to-columns delimiting | Excel Discussion (Misc queries) | |||
Putting plain text string into clipboard in VBA? | Excel Programming | |||
Put text on clipboard? | Excel Programming | |||
How have text on clipboard reformatted as a cell would be put there? | Excel Programming | |||
Copying the text from a text box to the clipboard | Excel Programming |