Macro invocation after data enrtry

  • Thread starter Thread starter josh
  • Start date Start date
J

josh

I have an Excel application which involves typing data into one or more
cells and then clicking a button which invokes a macro. The person who does
this data entry chronically forgets to press enter after typing the data and
instead clicks the macro button to no avail. Is there any way that a single
key stoke or mouse click could both signal the end of typing and invoke the
macro?
 
Thank you Frank. I thought about your solution, but I'm afraid my
application involves to many other worksheet changes where I don't want to
invoke the macro.

Josh Page
 
Hi
no problem as you can restrict this macro. e.g. try the following:
Private Sub Worksheet_Change(ByVal Target As Range)
if intersect (target,me.range("A1:A100")) is nothing then exit sub
'run your code
End Sub

your code is only invoked in this example if cell A1:A100 are changed
 

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