Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 36
Default A macro that will inable/disable input message boxes by a cell'svalue

I would like to be able to inable and disable the input message boxes
(Data Validation Input Message) in all worksheets according to the
dropdown message ("on" or "off") I select in cell A1 in Sheet1. I use
Excel 2003. Are there any suggestions? Thanks for your help.

Michael
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default A macro that will inable/disable input message boxes by a cell's value

Michael,

Assuming that you only have one type of datavalidation per any cell with validation....


Sub ToggleInputMessages()
Dim mySh As Worksheet
Dim myR As range
Dim myA As range
Dim TurnOn As Boolean

TurnOn = False

If Worksheets("Sheet1").Range("A1").Value = "on" Then TurnOn = True

For Each mySh In ActiveWorkbook.Worksheets
Set myR = Cells.SpecialCells(xlCellTypeAllValidation)
If myR Is Nothing Then GoTo NoValidation
For Each myA In myR.Areas
myA.Cells.Validation.ShowInput = TurnOn
Next myA
NoValidation:
Next mySh
End Sub


--
HTH,
Bernie
MS Excel MVP


wrote in message
...
I would like to be able to inable and disable the input message boxes
(Data Validation Input Message) in all worksheets according to the
dropdown message ("on" or "off") I select in cell A1 in Sheet1. I use
Excel 2003. Are there any suggestions? Thanks for your help.

Michael



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 36
Default A macro that will inable/disable input message boxes by a cell'svalue

Thanks Bernie. I'll be giving it a try shortly.

Michael
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Font of message and input boxes djExcel Excel Programming 1 February 25th 09 02:49 PM
Macro disable message Ewing25 Excel Programming 4 May 16th 08 07:06 PM
How to disable MS Excel Clipboard message when I run a macro Bon Excel Programming 1 December 15th 05 10:14 AM
How do I disable 'clipboard' message window in an Excel macro? Jason Griesbach Excel Programming 2 October 19th 04 10:54 PM
enable disable macro message Lisa Fischer Excel Programming 4 May 21st 04 10:27 PM


All times are GMT +1. The time now is 09:42 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"