Re: "Are all the sheet2 references meant to be changed to the name of the sheet I am putting the image in?"
Yes. Change that to the Sheet Name that has the TextBox and also obviously will get the picture.
What is the name of that sheet and what is the name of the textbox?
@Mike
I assumed that he/she means the printed page. We'll wait for confirmation either way.
The HPageBreaks properties being used are where there are page breaks when the user prints a page.
Are you placing the image realtive to that or are you concerned about what the use sees on screen rather than what is printed on a physical page?
In relation to post #23 Mike, the document will need to be printed to pdf. Once it is in pdf form, if the text box was near the bottom of the page, the image will be put inserted below the text box but it will be split between the last 2 pages. I had an idea that I could measure the distance between the the bottom of the text box and the bottom of the page and if there wasn't enough room for the picture, I could insert a page break to make a new page, then insert the picture. This would mean that the image would be on the one page.
So what happened when in the code from Post #13 you changed every occurrence of "Sheets("Sheet2") to Sheets("sheet1") and every occurrence of "TextBox 1" to "TextBox4"?
Note the capitalization or lack of it regarding the sheets as well as the lack of space in "TextBox4"
Normally the Sheets are named with a capital "S" unless you changed it yourself and the TextBoxes when added are with a space between the letters and the number.
We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel
Which adblocker are you using?
Disable AdBlock
Follow these easy steps to disable AdBlock
1)Click on the icon in the browser’s toolbar. 2)Click on the icon in the browser’s toolbar. 2)Click on the "Pause on this site" option.
Go back
Disable AdBlock Plus
Follow these easy steps to disable AdBlock Plus
1)Click on the icon in the browser’s toolbar. 2)Click on the toggle to disable it for "mrexcel.com".
Go back
Disable uBlock Origin
Follow these easy steps to disable uBlock Origin
1)Click on the icon in the browser’s toolbar. 2)Click on the "Power" button. 3)Click on the "Refresh" button.
Go back
Disable uBlock
Follow these easy steps to disable uBlock
1)Click on the icon in the browser’s toolbar. 2)Click on the "Power" button. 3)Click on the "Refresh" button.