Live Chat & Podcast at 1:00PM Eastern on Sunday!
There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
Search
Business Applications
Tag Cloud
access acer asus batch bios bsod computer crash desktop dns driver drivers error ethernet excel freeze gaming hard drive hardware hdmi internet laptop lcd malware memory monitor motherboard mouse network printer problem ram registry router security slow software sound trojan usb video virus vista wifi windows windows 7 windows 7 32 bit windows 7 64 bit windows xp wireless
Search
Search for:
Tech Support Guy Forums > Software & Hardware > Business Applications >
Solved: Excel 2007 -> Command Button

Reply  
Thread Tools
computerman29642's Avatar
Computer Specs
Senior Member with 2,794 posts.
 
Join Date: Dec 2007
Location: HERE OR THERE?!?!?!
Experience: Always Learning!
05-Nov-2009, 12:02 PM #1
Question 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
"Why so serious?....let's put a smile on that face" - The Joker
Rollin_Again's Avatar
Senior Member with 4,273 posts.
 
Join Date: Sep 2003
Location: Atlanta, GA - Planet Earth
Experience: Brilliant When Sober
05-Nov-2009, 12:29 PM #2
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
computerman29642's Avatar
Computer Specs
Senior Member with 2,794 posts.
 
Join Date: Dec 2007
Location: HERE OR THERE?!?!?!
Experience: Always Learning!
05-Nov-2009, 01:20 PM #3
Please see the attached file.
Attached Files
File Type: xls Book1.xls (40.5 KB, 40 views)
Rollin_Again's Avatar
Senior Member with 4,273 posts.
 
Join Date: Sep 2003
Location: Atlanta, GA - Planet Earth
Experience: Brilliant When Sober
05-Nov-2009, 04:26 PM #4
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
computerman29642's Avatar
Computer Specs
Senior Member with 2,794 posts.
 
Join Date: Dec 2007
Location: HERE OR THERE?!?!?!
Experience: Always Learning!
05-Nov-2009, 04:42 PM #5
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.
Zack Barresse's Avatar
Computer Specs
Distinguished Member with 5,030 posts.
 
Join Date: Jul 2004
Location: Oregon, United States
Experience: I'ma learnin'!
05-Nov-2009, 11:46 PM #6
World domination plans can be overwhelming at times. Multi-tasking is essential.
computerman29642's Avatar
Computer Specs
Senior Member with 2,794 posts.
 
Join Date: Dec 2007
Location: HERE OR THERE?!?!?!
Experience: Always Learning!
06-Nov-2009, 11:13 AM #7
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)?
Zack Barresse's Avatar
Computer Specs
Distinguished Member with 5,030 posts.
 
Join Date: Jul 2004
Location: Oregon, United States
Experience: I'ma learnin'!
06-Nov-2009, 12:33 PM #8
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).
computerman29642's Avatar
Computer Specs
Senior Member with 2,794 posts.
 
Join Date: Dec 2007
Location: HERE OR THERE?!?!?!
Experience: Always Learning!
06-Nov-2009, 01:23 PM #9
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
computerman29642's Avatar
Computer Specs
Senior Member with 2,794 posts.
 
Join Date: Dec 2007
Location: HERE OR THERE?!?!?!
Experience: Always Learning!
06-Nov-2009, 01:36 PM #10
Please see the updated Excel Workbook.

This is how the current code looks.
Attached Files
File Type: xls Book1_Revised.xls (33.0 KB, 43 views)
Zack Barresse's Avatar
Computer Specs
Distinguished Member with 5,030 posts.
 
Join Date: Jul 2004
Location: Oregon, United States
Experience: I'ma learnin'!
06-Nov-2009, 01: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.
computerman29642's Avatar
Computer Specs
Senior Member with 2,794 posts.
 
Join Date: Dec 2007
Location: HERE OR THERE?!?!?!
Experience: Always Learning!
06-Nov-2009, 02:16 PM #12
Thanks Zack.
Reply

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.

Search Tech Support Guy

Find the solution to your
computer problem!




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.
Thread Tools



Facebook Facebook Twitter Twitter TechGuy.tv TechGuy.tv Mobile TSG Mobile
You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 04:33 PM.
Copyright © 1996 - 2011 TechGuy, Inc. All rights reserved.

Powered by Cermak Technologies, Inc.