Call a module from Macro

captnk

Registered User.
Local time
Today, 21:07
Joined
Dec 12, 2001
Messages
148
I want to call a module (a timer event),from an Access Macro .
However I currently cant figure out how to get the macro ,using "run code" to run the module.

The module works fine on its own,so does the macro ,but Iam at a loss how to attach it.
Help Please
 
In your macro select run code, then in the function box that appears at the bottom type =yourfunction()
HTH
Dave
 
Last edited:
Call a module from a Macro

Tks Softboss....Unfortunately that doesnt work either.
It now tells me it cant find the item.

I.m really stuffed on this, Because I desperately need to stop Access while an xl spreadsheet calculates (Im currently achieving this bu using a message box,)but long term thats not feasible.
Think I,ll go have a Fosters.
Captnk
 
pleeassee help me!

hi, i am currently having the same problem, i want to be able to restrict people from accessing the tables through the forms, so i have a simple VB password code module, and i tried =password() and i got the same message, that it cant find the function, this is for my project at college and it would be a weight off my mind if anyone could tell me how i can run a module with "RunCode" in a macro!! pleeaaasseeeee!!!!
 
sorry

sorry, i'm not vb programmer i just raked this code of the internet..

Private Sub Form_Load()
Dim password As String
Dim inputpassword As String
Dim attempt As Integer
password = "secret"
attempt = 0
Do
inputpassword = InputBox("Enter Password. This is attempt number " & attempt)
attempt = attempt + 1
Loop Until (attempt = 10000000000#) Or (inputpassword = password)
If inputpassword = password Then
MsgBox ("Correct Password - Welcome to the faults form"), , "Valid Password"
Else
MsgBox "Invalid password", , "Go Away"
End If
End Sub

that is what i have as the password code which i would like ti impliment in a macro, could you please tell me how to do this?
 

Users who are viewing this thread

Back
Top Bottom