PC Review


Reply
Thread Tools Rate Thread

Coupled controls?

 
 
Ruatha
Guest
Posts: n/a
 
      11th Jun 2006

Hi, I have a button assciated with a macro, but I want to make sure tha
the button isn't pressed by mistake.
So I was thinking of having a checkbox, that when checked enables th
command button, and when unchecked the button is disabled.
How do I do that

--
Ruath
-----------------------------------------------------------------------
Ruatha's Profile: http://www.excelforum.com/member.php...fo&userid=3108
View this thread: http://www.excelforum.com/showthread.php?threadid=55077

 
Reply With Quote
 
 
 
 
Dave Peterson
Guest
Posts: n/a
 
      11th Jun 2006
I think I'd just add a bit to the macro that is associated with the button.

Option explicit
sub yoursubhere()

dim resp as long

resp = msgbox(Prompt:="Are you sure you want to do all this stuff", _
buttons:=vbyesno)

if resp = vbno then
exit sub
end if

'rest of your code here

Ruatha wrote:
>
> Hi, I have a button assciated with a macro, but I want to make sure that
> the button isn't pressed by mistake.
> So I was thinking of having a checkbox, that when checked enables the
> command button, and when unchecked the button is disabled.
> How do I do that?
>
> --
> Ruatha
> ------------------------------------------------------------------------
> Ruatha's Profile: http://www.excelforum.com/member.php...o&userid=31083
> View this thread: http://www.excelforum.com/showthread...hreadid=550770


--

Dave Peterson
 
Reply With Quote
 
Ruatha
Guest
Posts: n/a
 
      11th Jun 2006

Thanx for the help, I'll do that

--
Ruath
-----------------------------------------------------------------------
Ruatha's Profile: http://www.excelforum.com/member.php...fo&userid=3108
View this thread: http://www.excelforum.com/showthread.php?threadid=55077

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
a:hover and ahover are coupled Cal Who Microsoft ASP .NET 10 19th Jan 2010 08:56 PM
WCF in-code configuration more tightly coupled? suedeuno Microsoft C# .NET 1 18th Nov 2009 07:20 PM
COM+ loosely coupled events from .NET =?Utf-8?B?SnVhbiBEZW50?= Microsoft Dot NET Framework 1 21st Jul 2005 08:13 AM
Problem with Loosely Coupled COM + events in .NET Jacek Microsoft Dot NET Framework 0 12th Jul 2005 09:59 AM
Problem with loosely coupled events Mark Ritchie Microsoft Dot NET Framework 1 15th Oct 2004 09:05 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:22 PM.