Search results

  1. A

    Really Stupid Question

    Thanks guys and glad to know it isn't just me that can trip up on these things!
  2. A

    Really Stupid Question

    Fixed it - please feel free to slap me on the head. I was using the module name, not the function name contained within the module. Suppose the clue was in the error message "can't find the FUNCTION name". Thanks for all your suggestions. In my defence I did say it was really stupid!
  3. A

    Really Stupid Question

    Mr B. - changed the code as per your suggestion - again code ran in VB editor, but got can't find module in Access. SOS - I probably didn't explain it very well, the module, in the VB editor, is connected directly to the project name, it isn't a stub from a form.
  4. A

    Really Stupid Question

    Mr B. the top of the code now reads; Option Explicit Public Function SendMessage(Optional AttachmentPath) is that what you meant? Tried running the macro with the new module name, same result.
  5. A

    Really Stupid Question

    tried the recreating it bit, no joy, the module itself is sitting at the same level as my forms in the project window of VB editor. Basically I pasted it in from the MS website, made a couple of code chages, commented a few things out and made sure all the references were ticked. Damn..Microsoft...
  6. A

    Really Stupid Question

    Same result, still ran fine from within the VB editor, but the same error message when I try to run the macro. thanks for the suggestion though.
  7. A

    Really Stupid Question

    the code in question is Option Explicit Sub SendMessage(Optional AttachmentPath) Dim objOutlook As Outlook.Application Dim objOutlookMsg As Outlook.MailItem Dim objOutlookRecip As Outlook.Recipient Dim objOutlookAttach As Outlook.Attachment ' Create the Outlook session. Set...
  8. A

    Really Stupid Question

    OK two hours of zero progress and I'm now ready to kill. All I'm attempting to do is create a single command macro to run a piece of VB code. Creating a new macro, selecting runcode, entering the module name with () at the end and saving. The module is visible in Access and has a unique name...
Back
Top Bottom