News, tips, advice, support for Windows, Office, PCs & more. Tech help. No bull. We're community supported by donations from our Plus Members, and proud of it
Home icon Home icon Home icon Email icon RSS icon
  • Search within a Macro

    Posted on WSbcraig Comment on the AskWoody Lounge

    This topic contains 0 replies, has 0 voices, and was last updated by

     WSbcraig 2 years, 3 months ago.

    • Author
      Posts
    • #508339 Reply

      WSbcraig
      AskWoody Lounger

      Howdy!

      So I have an Access Database that has hundreds of EMailDatabaseObject macros. However when we need to change an email address, we have to go through every line and search for the customer (this takes a LONG time and gets frustrating)

      Is there a way to search within the macros or at least organize the macros in alphabetical order?

      Thanks!

    • #1592866 Reply

      RetiredGeek
      AskWoody MVP

      It will take some investment up front but I’d suggest that you change the macros to pull the email address from a table vs hard coding them in the macro. That way when a new person takes over a job you just change the email address associated with that position to the new person’s email.

      One thing I learned very early was that “it will never change” is among other lies like “the check’s in the mail”! Avoid hard coding anything that has any chance of changing or even anything that you think will never change but shows up many times in the code. That way when it does change it’s an easy fix, change one place and done!

      HTH :cheers:

      May the Forces of good computing be with you!

      RG

      PowerShell & VBA Rule!
      Computer Specs

      • #1592869 Reply

        WSbcraig
        AskWoody Lounger

        Thank you for your help!! We will most likely be switching to a new system in a couple of months, but was just wondering if there was a “quick fix” to save some headache until we switch. It doesn’t happen often when we need it changed, but its a pain when we do have to.

        Thanks again! It’s good knowledge for any of my future adventures on Access

    • #1592918 Reply

      WSMarkLiquorman
      AskWoody Lounger

      I use Rick Fisher’s “Find & Replace”, found at http://www.RickWorld.com. This is an absolutely indispensable tool for Access developers.

    Please follow the -Lounge Rules- no personal attacks, no swearing, and politics/religion are relegated to the Rants forum.

    Reply To: Search within a Macro

    You can use BBCodes to format your content.
    Your account can't use Advanced BBCodes, they will be stripped before saving.