How JustAnswer Works:
  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site.
    Ask follow up questions if you need to.
  • 100% Satisfaction Guarantee
    Rate the answer you receive.
Ask Richard Your Own Question
Richard
Richard, Software Specialist
Category: Microsoft Office
Satisfied Customers: 35288
Experience:  Over 15 year experience resolving Microsoft Office Issues
32989067
Type Your Microsoft Office Question Here...
Richard is online now
A new question is answered every 9 seconds

Hello Richie, Thanks again for your help today.

This answer was rated:

Hello Richie,





Thanks again for your help today. I have now tried to put in the same sheet 2 such Private Sub Worksheet_Change(ByVal Target As Range)





Unfortunately I get the following message:


Ambiguous name detected worsheet_change


Is there anything I can do to fix this?





I would really appreciate your help to fix this as I would like to have several such triggers in one spreadsheet.





I have uploaded the file again and the link can be found below:


http://wikisend.com/download/546368/oda23_playwith.xltm





Tks vm.








Olie
You need to put the code for Sheet 2 in sheet 2 in VBA Olie.

Not in Sheet 1

So double click Sheet 2 and put your code there as in Sheet 1.

Customer: replied 4 years ago.


That is precisely what I would like to avoid. I would like to be able to have in "one" spreadsheet several triggers such as the one that we managed to make work earlier. I would like to have up to 10 triggers in one spreadsheet without having to go to sheet2 ...if possible


Thanks


 

You mean you want to trigger on different Cells on sheet 1? Or in different sheets?

Customer: replied 4 years ago.


I want to trigger different macros on different cells in one spreadsheet plse.

ok, you have to do it all on that function, as all triggers go there

But Olie, that is no problem.

You just say in that function if statements to run what you need.

if range"a1"=1 then ect

if range "B2" = 2 then ect

But all code must start in that one function

Private Sub Worksheet_Change(ByVal Target As Range)

Customer: replied 4 years ago.


That is great ! Thanks vm for your very helpful feedback.

Anytime Olie

It can only have that function once in a sheet, so that was the problem

If you have continued problems, or would like any additional information or assistance, please do not hesitate to let me know.

And if you can take a second to rate my service, that would be greatly appreciated.

Thank you
Richard and other Microsoft Office Specialists are ready to help you

Related Microsoft Office Questions