Is it possible to call an image from an access form using VBA code?
I have a database that exports data into an excel file with several worksheets. I have gotten almost everything to work correctly with the database and reports (thanks Rod!) except one thing.
I haven't yet figured out how to insert a picture into the header of each worksheet that is currently embedded in one of the forms.
- The form name is frmLogoForm and the image name is imgLogoImage.
I currently have the report correctly inserting text into the left header with the following code:
Dim WS As Worksheet
For Each WS In Worksheets
WS.PageSetup.LeftHeader = "Text Test"
Next WS
This does put the "Text Test" text into the header of each worksheet, however, I would really like to have an image there, not just text. I have seen examples where the image is called from a file on a hard drive but then if I move the picture file or database the link will be broken. My rationale is that if the image is embedded in a form in the database then it will stay with the database wherever it may be moved to. Any thoughts?