Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default Validation List

Is there a way to reset a validation list to "blank" or for example the first
choice in the list in a macro?

Thanks.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 216
Default Validation List

range("A1").Value =""

where a1 is the cell with the DV.

--
HTH

Bob Phillips

(remove xxx from email address if mailing direct)

"Modell" wrote in message
...
Is there a way to reset a validation list to "blank" or for example the

first
choice in the list in a macro?

Thanks.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default Validation List

That works great. Thanks Bob.

"Bob Phillips" wrote:

range("A1").Value =""

where a1 is the cell with the DV.

--
HTH

Bob Phillips

(remove xxx from email address if mailing direct)

"Modell" wrote in message
...
Is there a way to reset a validation list to "blank" or for example the

first
choice in the list in a macro?

Thanks.




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default Validation List

I ran into a problem. I have the following code in a worksheet, so when that
cell is changed, it automatically runs a macro. Is there any way to have it
skip the macro if the cell is blank?

Here's the code I have in place right now.


If Target.Address = "$C$10" Then
Application.Run "Program_Filter"

I want the application "Program_Filter" to automatically run when $C$10 is
changed only if the cell isn't blank. Basically, if it could check the cell
first to determine whether or not it's blank, then if it is blank skip
running the macro, otherwise if it isn't blank, go ahead and proceed to run
the macro.

Thanks for all your help Bob. You too Debra.


"Modell" wrote:

That works great. Thanks Bob.

"Bob Phillips" wrote:

range("A1").Value =""

where a1 is the cell with the DV.

--
HTH

Bob Phillips

(remove xxx from email address if mailing direct)

"Modell" wrote in message
...
Is there a way to reset a validation list to "blank" or for example the

first
choice in the list in a macro?

Thanks.




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 216
Default Validation List

If Target.Address = "$C$10" Then
If Target.Value < "" Then
Application.Run "Program_Filter"


don't forget the extra End If

--
HTH

Bob Phillips

(remove xxx from email address if mailing direct)

"Modell" wrote in message
...
I ran into a problem. I have the following code in a worksheet, so when

that
cell is changed, it automatically runs a macro. Is there any way to have

it
skip the macro if the cell is blank?

Here's the code I have in place right now.


If Target.Address = "$C$10" Then
Application.Run "Program_Filter"

I want the application "Program_Filter" to automatically run when $C$10 is
changed only if the cell isn't blank. Basically, if it could check the

cell
first to determine whether or not it's blank, then if it is blank skip
running the macro, otherwise if it isn't blank, go ahead and proceed to

run
the macro.

Thanks for all your help Bob. You too Debra.


"Modell" wrote:

That works great. Thanks Bob.

"Bob Phillips" wrote:

range("A1").Value =""

where a1 is the cell with the DV.

--
HTH

Bob Phillips

(remove xxx from email address if mailing direct)

"Modell" wrote in message
...
Is there a way to reset a validation list to "blank" or for example

the
first
choice in the list in a macro?

Thanks.







  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default Validation List

Thanks Bob. That worked great. Your help is much appreciated.

"Bob Phillips" wrote:

If Target.Address = "$C$10" Then
If Target.Value < "" Then
Application.Run "Program_Filter"


don't forget the extra End If

--
HTH

Bob Phillips

(remove xxx from email address if mailing direct)

"Modell" wrote in message
...
I ran into a problem. I have the following code in a worksheet, so when

that
cell is changed, it automatically runs a macro. Is there any way to have

it
skip the macro if the cell is blank?

Here's the code I have in place right now.


If Target.Address = "$C$10" Then
Application.Run "Program_Filter"

I want the application "Program_Filter" to automatically run when $C$10 is
changed only if the cell isn't blank. Basically, if it could check the

cell
first to determine whether or not it's blank, then if it is blank skip
running the macro, otherwise if it isn't blank, go ahead and proceed to

run
the macro.

Thanks for all your help Bob. You too Debra.


"Modell" wrote:

That works great. Thanks Bob.

"Bob Phillips" wrote:

range("A1").Value =""

where a1 is the cell with the DV.

--
HTH

Bob Phillips

(remove xxx from email address if mailing direct)

"Modell" wrote in message
...
Is there a way to reset a validation list to "blank" or for example

the
first
choice in the list in a macro?

Thanks.






  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,979
Default Validation List

There's a sample file here that clears cells with data validation, and
selects the first item from a validation list, if one exists:

http://www.contextures.com/excelfiles.html

Under Data Validation, look for 'Reset Data Validation Cells'

Modell wrote:
Is there a way to reset a validation list to "blank" or for example the first
choice in the list in a macro?

Thanks.



--
Debra Dalgleish
Contextures
http://www.contextures.com/tiptech.html

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
data validation invalid in dynamic validation list ilia Excel Discussion (Misc queries) 0 November 7th 06 12:54 PM
data validation invalid in dynamic validation list ilia Excel Worksheet Functions 0 November 7th 06 12:54 PM
Validation (Drop down list vs simple text length validation) Bob Phillips[_6_] Excel Programming 2 April 27th 04 07:47 PM
Validation (Drop down list vs simple text length validation) Jason Morin[_2_] Excel Programming 1 April 27th 04 04:56 PM
Validation (Drop down list vs simple text length validation) Pete McCosh Excel Programming 0 April 27th 04 03:49 PM


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

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

About Us

"It's about Microsoft Excel"