View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Celtic_Avenger[_43_] Celtic_Avenger[_43_] is offline
external usenet poster
 
Posts: 1
Default Run Macro Only If 4 Cells Are Filled In By User In VBA


Hi again.

I have a sheet where the user is required to answer 4 question befor
continuing.
The user has to enter data into 4 cells before being allowed to pres
the continue button.

I have allready created the button to run the next operation whe
pressing "Continue", but I would like the button to be dis-enable
until all 4 cells are completed.

The cell refferences a

E6, E8, E10, and E12

The button is still currently named "CommandButton1_Click()" but thi
will be changed later.

I can use the code:

ActiveSheet.Shapes("CommandButton1").Visible = False

to hide the button if all cells are not completed, but I would prefe
to still see it but have it dis-enabled as if in the contro
properties. If I try to record a macro to disenable the button, th
only code that is recorded is the selection of the button.
Is there a way that this can be written in code? And where would
place the code, would it be in the Worksheet Selection_Change area?

Thanks For Any Help You Can Give.


Celtic_Avenger
:confused

--
Celtic_Avenge
-----------------------------------------------------------------------
Celtic_Avenger's Profile: http://www.excelforum.com/member.php...fo&userid=1410
View this thread: http://www.excelforum.com/showthread.php?threadid=26137