Worksheet_Change from a validated list

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
Excel 97?

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 
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
 
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
 
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
 
Thanks Nick,

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top