Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #11   Report Post  
Old February 9th 18, 09:54 AM posted to microsoft.public.excel.misc
external usenet poster
 
First recorded activity by ExcelBanter: Apr 2015
Posts: 869
Default Pasting text into VBA macro?

But instead of immediately pasting the image from the text on the
clipboard (into fixed cell A30) it brings up a browser dialog.

The purpose of my version is for efficiency:

1. It has no external dependancies;
-doesn't use the clipboard and so doesn't require a ref to Forms2.0
-it doesn't require using Macro Express

2. It inserts the picture wherever you decide before running the macro;
-gives you greater flexibility over using a hard-coded target

3. It allows you to specify the full path to the pic;
-encapsulates the process within a single app

4. The code is reusable in other projects;
-except for the selection of row27 (could be done manually
-allows you to do similar process in other projects

So unless this is a dedicated task project, generic code that's reusable is
always a better asset to have in you repertoire!

I'm happy enough using my fully working macro below (based on my
trial/error adaptations from killme2008's), but I'm keen to know why
(unlike yours) it fails when placed outside PERSNAL.xlsb.


Your PERSONAL.xls probably has a ref to the Forms2.0 lib by way of
Tools::References or it contains a Userform.

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion

  #12   Report Post  
Old February 9th 18, 05:29 PM posted to microsoft.public.excel.misc
external usenet poster
 
First recorded activity by ExcelBanter: Aug 2015
Posts: 140
Default Pasting text into VBA macro?

GS wrote:

But instead of immediately pasting the image from the text on the
clipboard (into fixed cell A30) it brings up a browser dialog.

The purpose of my version is for efficiency:

1. It has no external dependancies;
-doesn't use the clipboard and so doesn't require a ref to Forms2.0
-it doesn't require using Macro Express

2. It inserts the picture wherever you decide before running the macro;
-gives you greater flexibility over using a hard-coded target

3. It allows you to specify the full path to the pic;
-encapsulates the process within a single app

4. The code is reusable in other projects;
-except for the selection of row27 (could be done manually
-allows you to do similar process in other projects

So unless this is a dedicated task project, generic code that's reusable is
always a better asset to have in you repertoire!

I'm happy enough using my fully working macro below (based on my
trial/error adaptations from killme2008's), but I'm keen to know why
(unlike yours) it fails when placed outside PERSNAL.xlsb.


Your PERSONAL.xls probably has a ref to the Forms2.0 lib by way of
Tools::References or it contains a Userform.


Thanks, yes, that proved to be the reason.

I've archived your version filed for future use, but this is a very
specific project as you may have gathered from my illustrations.

Terry, East Grinstead, UK
  #13   Report Post  
Old February 9th 18, 07:24 PM posted to microsoft.public.excel.misc
external usenet poster
 
First recorded activity by ExcelBanter: Apr 2015
Posts: 869
Default Pasting text into VBA macro?

I've archived your version filed for future use, but this is a very
specific project as you may have gathered from my illustrations.


Yes.., I suspected that. I got another suspicion, though, that you might do
similar process[es] in other projects and so why the generic reusable code.

I'm also not a fan of using another program to do something Excel can do so my
projects are stand-alone and therefore self-sufficient. Nor am I a fan of
making projects that require unnecessary refs to external libs if not needed.

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
losing text from text box when pasting selection to word rallyworker Excel Discussion (Misc queries) 0 April 13th 07 08:44 AM
Cutting and pasting large variable text into a text box shape usin AJL Excel Programming 0 October 30th 06 07:54 PM
Pasting Text Lisa Excel Discussion (Misc queries) 1 May 10th 06 07:35 PM
Pasting text wnfisba Excel Discussion (Misc queries) 1 October 20th 05 07:23 PM
Pasting text from Excel to Word (macro) TT[_2_] Excel Programming 1 January 25th 05 02:23 AM


All times are GMT +1. The time now is 09:05 AM.

Powered by vBulletin® Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
Copyright 2004-2018 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"

 

Copyright © 2017