Hi guys! Long time lurker first time poster here. Thank you so much for all the help you've been giving Excel n00bs such as myself so far. Has been very useful
My problem is in the title. After some googling, I've found a few methods, but need some further assistance.
1) The first method is Stephen Bullen's 'PastePicture' method. I've seen this cited a few times. The problem is that all the links to the file holding the code are dead. Infact, his entire website is down at the moment. I do not know if this is temporary or permanent; but either way, I cannot access the code for this method in order to study it. Does anyone have a copy of it saved, or know where I can find it? Or maybe remembers the logic and methods used?
2) The second method that I've come across is to upload all the images into the UserForm during initialization, and then just toggle their visibility on and off. This sounds extremely clunky, and I'm worried it may slow down the whole process. Would it actually slow down my program? And if not, is the code to do this relatively simple and easy to implement?
3) The third method is actually one from Ozgrid - Picture In Cell Into Image Control
Junho Lee posted this solution back in 2007, and I have downloaded the file and tried it out. It does actually work. However, I can't make heads or tails of the code itself. There are a lot of Privately Declared Functions and variables used that I do not understand. As such, I'm not quite sure how to take this code and use it within my existing project. I am studying it, but if anyone could go through it and explain the logic used for it, and perhaps highlight the key variables that I need to understand and alter to get the code to work in my project, I would greatly appreciate it!
Alternately, if anyone is aware of a different solution to what I've listed above, do please let me know
Some extra details on of my project that may or may not be useful:
- I use a UserForm to collect data from the user. There is text, two images, and some command buttons/drop down lists
- When they click the button to upload an image, they are prompted to select the file they want to upload from the computer. This basically is asking the user for the address of the file on the computer.
- After they've made their selection, the program then loads that image on to the UserForm AND two different worksheets (in the same workbook). All three lines of code us the same file address that the user selected. The images are loaded into the worksheets at specific addresses (determined earlier and stored in variables) and with specific sizes (determined earlier and stored in variables). One worksheet is called "Database" - this holds all the records the user has entered - and the other is called "Form" - this is basically a pretty-looking template which is used to save all the data entered into the UserForm as a PDF file.
- So far the uploading procedure works perfectly. Error checks and everything.
- What I am trying to add in now are two buttons - 'Previous' and 'Next' - to allow the User to cycle through all records stored in the Database sheet. Pretty standard I would imagine. So far that works well too - I get all the info read from the sheet and updated onto the UserForm, and the user is allowed to edit it. He can cycle back and forth. I got error conditions for when he's at the start or end of the Database. It all works perfectly.
- The only thing I'm stuck on are getting the images read from the sheet and moved into the UserForm.
And that's why I'm here. Any help appreciated. If you need anymore info, let me know
Thanks guys!
My problem is in the title. After some googling, I've found a few methods, but need some further assistance.
1) The first method is Stephen Bullen's 'PastePicture' method. I've seen this cited a few times. The problem is that all the links to the file holding the code are dead. Infact, his entire website is down at the moment. I do not know if this is temporary or permanent; but either way, I cannot access the code for this method in order to study it. Does anyone have a copy of it saved, or know where I can find it? Or maybe remembers the logic and methods used?
2) The second method that I've come across is to upload all the images into the UserForm during initialization, and then just toggle their visibility on and off. This sounds extremely clunky, and I'm worried it may slow down the whole process. Would it actually slow down my program? And if not, is the code to do this relatively simple and easy to implement?
3) The third method is actually one from Ozgrid - Picture In Cell Into Image Control
Junho Lee posted this solution back in 2007, and I have downloaded the file and tried it out. It does actually work. However, I can't make heads or tails of the code itself. There are a lot of Privately Declared Functions and variables used that I do not understand. As such, I'm not quite sure how to take this code and use it within my existing project. I am studying it, but if anyone could go through it and explain the logic used for it, and perhaps highlight the key variables that I need to understand and alter to get the code to work in my project, I would greatly appreciate it!
Alternately, if anyone is aware of a different solution to what I've listed above, do please let me know
Some extra details on of my project that may or may not be useful:
- I use a UserForm to collect data from the user. There is text, two images, and some command buttons/drop down lists
- When they click the button to upload an image, they are prompted to select the file they want to upload from the computer. This basically is asking the user for the address of the file on the computer.
- After they've made their selection, the program then loads that image on to the UserForm AND two different worksheets (in the same workbook). All three lines of code us the same file address that the user selected. The images are loaded into the worksheets at specific addresses (determined earlier and stored in variables) and with specific sizes (determined earlier and stored in variables). One worksheet is called "Database" - this holds all the records the user has entered - and the other is called "Form" - this is basically a pretty-looking template which is used to save all the data entered into the UserForm as a PDF file.
- So far the uploading procedure works perfectly. Error checks and everything.
- What I am trying to add in now are two buttons - 'Previous' and 'Next' - to allow the User to cycle through all records stored in the Database sheet. Pretty standard I would imagine. So far that works well too - I get all the info read from the sheet and updated onto the UserForm, and the user is allowed to edit it. He can cycle back and forth. I got error conditions for when he's at the start or end of the Database. It all works perfectly.
- The only thing I'm stuck on are getting the images read from the sheet and moved into the UserForm.
And that's why I'm here. Any help appreciated. If you need anymore info, let me know
Thanks guys!