ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Disable Button (https://www.excelbanter.com/excel-programming/294827-disable-button.html)

Pete JM[_3_]

Disable Button
 
hi,

Is there a peice of code i could add to the beginning of a macro tha
would look in a cell, say A1 and if the value in that cell is False th
macro would not run. But if the Value is True then let the macro run.

Regards

Pet

--
Message posted from http://www.ExcelForum.com


Chip Pearson

Disable Button
 
Pete,

At the beginning of the procedure, use code like

If Range("A1").Value = False Then
Exit Sub
End If


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"Pete JM " wrote in
message ...
hi,

Is there a peice of code i could add to the beginning of a

macro that
would look in a cell, say A1 and if the value in that cell is

False the
macro would not run. But if the Value is True then let the

macro run.

Regards

Pete


---
Message posted from http://www.ExcelForum.com/




Pete JM[_4_]

Disable Button
 
Perfect!

Thank you very much for you help

Regards

Pet

--
Message posted from http://www.ExcelForum.com



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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com