none
Standalone vs Embedded Macro RRS feed

  • Question

  • I have a Macro that is designed to change the Enabled setting of controls in a form depending on a specific Yes/No record held in another form. As a standalone macro it works fine. However I want to embed this in a customised "Switchboard" form. When I try to do this by using the Button and putting in the macro directly, the system comes back and says that the control whose attribute I want to change "is misspelled or refers to a control that doesn't exist" and further details advises that it is Error 3201. I have also tried using the embedded Macro wizard with Run Macro and pointed at the standalone Macro, but that comes up with the same error 3021.

    Clearly the control does exist, because the standalone version works, so what is going wrong? I would be grateful for any help on this issue before I pull out the last strands of my hair!!

    Friday, July 15, 2016 3:31 PM

Answers

All replies

  • Hi SandyDun,

    can you show us your macro so that we can try to make a test on our side.

    it is possible that you need to make a change in your code to reference the control correctly.

    and in the current macro the code is not able to find the control correctly.

    so at this stage from your description we can only assume that the code is not able to find the control.

    so if you post the Demo code then we can try to help you further.

    Regards

    Deepak


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, July 18, 2016 12:53 AM
    Moderator
  • if this is not a web app - so that vba is available - my recommendation is to not use a macro and instead use vba. 

    I have found macros are fine in some situations, in fact I prefer them in some situations, but the point of reference to a control can be a real problem as you are also discovering.  It is much quicker to revert to vba in these situations I have found.

    Tuesday, July 19, 2016 1:00 PM