Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.databases.ms-access > #11298
| From | "Ron Paii" <None@none.com> |
|---|---|
| Newsgroups | comp.databases.ms-access |
| Subject | Re: Which (if any) function will run |
| Date | 2015-11-02 14:07 -0600 |
| Organization | A noiseless patient Spider |
| Message-ID | <n18flp$1e2$1@dont-email.me> (permalink) |
| References | <n0ve51$blj$1@speranza.aioe.org> |
"Phil" <phil@stantonfamily.co.uk> wrote in message
news:n0ve51$blj$1@speranza.aioe.org...
> I have 3 modules: Query, Util & StartRoutine
>
> In the Query module I have a function
> Function XXXX()
> Application.Run "TestMsg"
> End Function
>
> In the StartRoutine module I have a function
> Function TestMsg()
> MsgBox "This is a test in Module 'StartRoutines'"
> End Function
>
> If I type in the debug window Print XXXX I get the message box up
> correctly.
>
> In the Util module I add
>
> Sub TestMsg()
> MsgBox "This is a test message in 'Util'"
> End Sub
>
> If I now type in the debug window Print XXXX I get error 2517 'can't find
> procedure 'TestMsg'
>
> If I remove the function from the StartRoutine module, all works correctly
> again.
>
> Is there a way of defining which TestMsg to run?
>
> Phil
1st you have 2 TestMsg objects. If you need to keep those name, prefix the
call with the module name.
StartRoutine.TestMsg()
2nd you should prefix the function with Public or Private, instead of
allowing the default setting decide
public Sub TestMsg()
MsgBox "This is a test message in 'Util'"
End Sub
Back to comp.databases.ms-access | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Which (if any) function will run "Phil" <phil@stantonfamily.co.uk> - 2015-10-30 09:43 +0000
Re: Which (if any) function will run Patrick Finucane <patrickfinucanetx@gmail.com> - 2015-10-30 06:19 -0700
Re: Which (if any) function will run "Phil" <phil@stantonfamily.co.uk> - 2015-10-30 13:39 +0000
Re: Which (if any) function will run Patrick Finucane <patrickfinucanetx@gmail.com> - 2015-10-30 06:48 -0700
Re: Which (if any) function will run "Ron Paii" <None@none.com> - 2015-11-02 14:07 -0600
Re: Which (if any) function will run "Phil" <phil@stantonfamily.co.uk> - 2015-11-02 23:16 +0000
Re: Which (if any) function will run "Ron Paii" <None@none.com> - 2015-11-03 06:57 -0600
Re: Which (if any) function will run "Phil" <phil@stantonfamily.co.uk> - 2015-11-03 22:29 +0000
Re: Which (if any) function will run "Ron Paii" <None@none.com> - 2015-11-04 08:55 -0600
Re: Which (if any) function will run "Phil" <phil@stantonfamily.co.uk> - 2015-11-05 23:28 +0000
csiph-web