Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 82
Default Worksheet_Change from a validated list

Hi

I'm trying to program a sheet to automatically refresh (run a refresh macro)
whenever the value of cell D5 is updated. D5 is set up as a validated list,
where the allowed values are a list of dates. A drop-down list enables the
desired date.

Here's what I have so far. For some reason, the code doesn't execute when a
new value is selected in the drop-down.

Private Sub Worksheet_Change(ByVal Target As Range)

Application.EnableEvents = False

Refresh 'macro that updates & sorts the information on the page

Application.EnableEvents = True

End Sub

Thanks in Advance

JonR
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Worksheet_Change from a validated list

Excel 97?

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"JonR" wrote in message
...
Hi

I'm trying to program a sheet to automatically refresh (run a refresh

macro)
whenever the value of cell D5 is updated. D5 is set up as a validated

list,
where the allowed values are a list of dates. A drop-down list enables

the
desired date.

Here's what I have so far. For some reason, the code doesn't execute when

a
new value is selected in the drop-down.

Private Sub Worksheet_Change(ByVal Target As Range)

Application.EnableEvents = False

Refresh 'macro that updates & sorts the information on the page

Application.EnableEvents = True

End Sub

Thanks in Advance

JonR



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 82
Default Worksheet_Change from a validated list



Excel 2000, running on XPPro

JonR


"Bob Phillips" wrote:

Excel 97?

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"JonR" wrote in message
...
Hi

I'm trying to program a sheet to automatically refresh (run a refresh

macro)
whenever the value of cell D5 is updated. D5 is set up as a validated

list,
where the allowed values are a list of dates. A drop-down list enables

the
desired date.

Here's what I have so far. For some reason, the code doesn't execute when

a
new value is selected in the drop-down.

Private Sub Worksheet_Change(ByVal Target As Range)

Application.EnableEvents = False

Refresh 'macro that updates & sorts the information on the page

Application.EnableEvents = True

End Sub

Thanks in Advance

JonR




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Worksheet_Change from a validated list

Hi

DOnt know if this will solve your problrm but here goes.

If I understand you right, D5 gets updated on the basis of a dropdown
list. If you create this dropdown list using a "combobox" provided in
the forms toolbar and assign your macro to that, the sheet should
refresh.

Hope it helps.

Prasad

JonR wrote:
Hi

I'm trying to program a sheet to automatically refresh (run a refresh macro)
whenever the value of cell D5 is updated. D5 is set up as a validated list,
where the allowed values are a list of dates. A drop-down list enables the
desired date.

Here's what I have so far. For some reason, the code doesn't execute when a
new value is selected in the drop-down.

Private Sub Worksheet_Change(ByVal Target As Range)

Application.EnableEvents = False

Refresh 'macro that updates & sorts the information on the page

Application.EnableEvents = True

End Sub

Thanks in Advance

JonR


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Worksheet_Change from a validated list

Hi

DOnt know if this will solve your problrm but here goes.

If I understand you right, D5 gets updated on the basis of a dropdown
list. If you create this dropdown list using a "combobox" provided in
the forms toolbar and assign your macro to that, the sheet should
refresh.

Hope it helps.

Prasad

JonR wrote:
Hi

I'm trying to program a sheet to automatically refresh (run a refresh macro)
whenever the value of cell D5 is updated. D5 is set up as a validated list,
where the allowed values are a list of dates. A drop-down list enables the
desired date.

Here's what I have so far. For some reason, the code doesn't execute when a
new value is selected in the drop-down.

Private Sub Worksheet_Change(ByVal Target As Range)

Application.EnableEvents = False

Refresh 'macro that updates & sorts the information on the page

Application.EnableEvents = True

End Sub

Thanks in Advance

JonR




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 415
Default Worksheet_Change from a validated list

Then validation triggers a WorkSheet_Change event.
Unless events have been disabled. Maybe due to a partial running of your
code ?
We are talking about Excel's Data Validation ?

NickHK

"JonR" ...


Excel 2000, running on XPPro

JonR


"Bob Phillips" wrote:

Excel 97?

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"JonR" wrote in message
...
Hi

I'm trying to program a sheet to automatically refresh (run a refresh

macro)
whenever the value of cell D5 is updated. D5 is set up as a validated

list,
where the allowed values are a list of dates. A drop-down list enables

the
desired date.

Here's what I have so far. For some reason, the code doesn't execute
when

a
new value is selected in the drop-down.

Private Sub Worksheet_Change(ByVal Target As Range)

Application.EnableEvents = False

Refresh 'macro that updates & sorts the information on the page

Application.EnableEvents = True

End Sub

Thanks in Advance

JonR






  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 82
Default Worksheet_Change from a validated list

Thanks Nick,

I closed the file and re-opened it. That seemed to reset whatever was
hanging up. It works now.
--

JonR


"NickHK" wrote:

Then validation triggers a WorkSheet_Change event.
Unless events have been disabled. Maybe due to a partial running of your
code ?
We are talking about Excel's Data Validation ?

NickHK

"JonR" ...


Excel 2000, running on XPPro

JonR


"Bob Phillips" wrote:

Excel 97?

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"JonR" wrote in message
...
Hi

I'm trying to program a sheet to automatically refresh (run a refresh
macro)
whenever the value of cell D5 is updated. D5 is set up as a validated
list,
where the allowed values are a list of dates. A drop-down list enables
the
desired date.

Here's what I have so far. For some reason, the code doesn't execute
when
a
new value is selected in the drop-down.

Private Sub Worksheet_Change(ByVal Target As Range)

Application.EnableEvents = False

Refresh 'macro that updates & sorts the information on the page

Application.EnableEvents = True

End Sub

Thanks in Advance

JonR






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
Validated list - how to make conditional smartgal Excel Discussion (Misc queries) 1 June 18th 09 03:27 AM
Creating a list from validated data jules3838 Excel Discussion (Misc queries) 0 February 26th 09 04:14 PM
Max value in validated list Erin Excel Discussion (Misc queries) 4 June 22nd 07 02:15 AM
Unique Dynamic Validated List Jon C Excel Worksheet Functions 1 June 10th 05 02:47 PM
To make sure only the Validated list can be put in the drop down b Belmeera Pinto Excel Programming 1 January 12th 05 12:55 PM


All times are GMT +1. The time now is 11:59 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"