Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Embedding Graphics in a VBA Macro

Status
Not open for further replies.

arbeeone

Technical User
Jul 17, 2005
11
AU
Hi,
What I'm wanting to do is create a macro which, in addition to formatting a data file, also prints the Company Logo at the top of the page. The problem is that once the macro is distributed, there would be no common source from which to import the graphics.

So, is there any way to embed a logo (or any other graphics picture) within a VBA macro so that it can be printed without having to import it each time from some other file location?

rb
 
There is no way that I know of to make a specific image stay with a macro. The macro inserts the image - it must get it from SOMEWHERE.

That being said...how are you "distributing" the macro? In a file you could embed the image.

also it may be possible to have the image actually IN a userForm, extract it, then stick in the document.

Gerry
 
The macro processes what is essentially timesheet data extracted from a corporate data base and then does a LOT of formatting! At the moment, it had been a local office initiative but the desire is to distribute it nationally to all other offices. Some of the output goes externally to customers, hence the desire to have logos/graphics.

I've been toying with various options as to how the logo(s) could be added to the reports - including simply using pre-printed paper, or loading the image into an empty Worksheet and then having the users load the data into that.

However, it would have been nice if the graphics images(s) could somehow have been linked with the macro, but your answer tends to confirm my doubts that it could be done.

rb
 

rb,

VBA is not like VB in that it is part of an application -- hence: Visual BASIC for Applications.

In WHAT APPLICATION are you going to distribute this timesheet? The graphic could indeed be embedded in this APPLICATION.

Skip,

[glasses] [red]A palindrome gone wrong?[/red]
A man, a plan, a ROOT canal...
PULLEMALL![tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top