 | Distinguished Member with 2,640 posts. | | Join Date: Dec 2007 Location: HERE OR THERE?!?!?! Experience: Always Learning! | | Solved: Excel 2007 -> Command Button I have placed a command button on one of my worksheets. The command button is used to place an image on the worksheet.
I would like to set the command button's property Enabled to false once it has inserted the image on the worksheet. However, I am unable to figure out how to do that through code.
Also, is there a way through code to determine if teh image was inserted?
__________________ Computerman29642
"I can do all things through Christ which strengtheneth me." (Philippians 4:13) | | Distinguished Member with 3,730 posts. | | Join Date: Sep 2003 Location: Atlanta, GA - Planet Earth Experience: Brilliant When Sober | | Please post your code that places the image on the worksheet.
Can you also tell us if your command button is from the Forms or Controls Toolbox?
Regards,
Rollin | | Distinguished Member with 2,640 posts. | | Join Date: Dec 2007 Location: HERE OR THERE?!?!?! Experience: Always Learning! | | Please see the attached file. | | Distinguished Member with 3,730 posts. | | Join Date: Sep 2003 Location: Atlanta, GA - Planet Earth Experience: Brilliant When Sober | | I stepped through your code it is looks like it already disables the button once the image is inserted. Does it not work for you?
Regards,
Rollin | | Distinguished Member with 2,640 posts. | | Join Date: Dec 2007 Location: HERE OR THERE?!?!?! Experience: Always Learning! | | Rollin,
I apologize. Yes, it does work for me. I am working on multiple things at once, and I just read where you asked to see the code. | | Distinguished Member with 4,511 posts. | | Join Date: Jul 2004 Location: Oregon, United States Experience: I'ma learnin'! | | World domination plans can be overwhelming at times. Multi-tasking is essential. | | Distinguished Member with 2,640 posts. | | Join Date: Dec 2007 Location: HERE OR THERE?!?!?! Experience: Always Learning! | | LOL...You're telling me. I am exhausted.
I guess the main question now is what do you think about the code. Is there a better way I could have handle some aspects of the code (or all the code)? | | Distinguished Member with 4,511 posts. | | Join Date: Jul 2004 Location: Oregon, United States Experience: I'ma learnin'! | | Yeah, the code looks good. The only thing I'd look at maybe not using us the ActiveSheet, and that's just my severe aversion to it (as you know). | | Distinguished Member with 2,640 posts. | | Join Date: Dec 2007 Location: HERE OR THERE?!?!?! Experience: Always Learning! | | Yeah...I do not like using ActiveSheet either (after you have critic my codes before).
Did you get the code I sent to you through e-mail? That is actually the most current version of the code | | Distinguished Member with 2,640 posts. | | Join Date: Dec 2007 Location: HERE OR THERE?!?!?! Experience: Always Learning! |
06-Nov-2009, 12:36 PM
#10 | Please see the updated Excel Workbook.
This is how the current code looks. | | Distinguished Member with 4,511 posts. | | Join Date: Jul 2004 Location: Oregon, United States Experience: I'ma learnin'! |
06-Nov-2009, 12:58 PM
#11 | I did get it via email. Saw this post and figured I'd post here. Trying to read VBA on my handheld is a bit precarious, it was the first time I'd done it. I got some funny looks while trying to scroll through it, I guess I looked intense. LOL!
But the code looks good. It's simple, elegant, does what you want, references are explicit, and it's backwards/forwards compatible. I think you have a winner. | | Distinguished Member with 2,640 posts. | | Join Date: Dec 2007 Location: HERE OR THERE?!?!?! Experience: Always Learning! |
06-Nov-2009, 01:16 PM
#12 | | | |
Smart Search
| Find your solution! | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | | |  WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who want to help you solve your computer problems. See our Welcome Guide to get started.
| You Are Using: |
Advertisements do not imply our endorsement of that product or service.
All times are GMT -5. The time now is 02:57 PM.
Copyright © 1996 - 2009 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2009, Jelsoft Enterprises Ltd. | |
|