getting clipboard contents for placement into a modal form

G

Gary Rynearson

Is their any way to past the Windows clipboard into a modal form? For
example, I have recorded an Excel macro that imports data into a worksheet,
but instead of hard-coding the filename for inporting, I want he macro to
use the Windows clipboard as the source for the imported filename.

Any help would be greatly appreciated.

Gary
 
C

Cindy M.

Hi Gary,
Is their any way to past the Windows clipboard into a modal form? For
example, I have recorded an Excel macro that imports data into a worksheet,
but instead of hard-coding the filename for inporting, I want he macro to
use the Windows clipboard as the source for the imported filename.
As long as we're talking about VBA UserForms, yes, it should be possible. Look
up the DataObject object and the GetFromClipboard method in the VBA help
files. Both are part of the FORMS object model common to all Office apps.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top