473,385 Members | 1,907 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

call functions in another module

232 100+
Expand|Select|Wrap|Line Numbers
  1. Sub main()
  2. Call mod1.fn1
  3. Call mod1.fn2
  4. End Sub
this function which is in mod2 calls only function 1 but not function 2.kindly help
Thanx in advance
access 2007
vba
Jun 27 '12 #1
5 8094
ahd2008
68
kkshansid,

I think no one would be able to help you with regard to your question. You need to add more details to help us to analyze and diagnosis your problem. It would be useful if you could add the code for fn1 and fn2.

All in all, I can suggest the followings as of now:

1- Check if fn2 is declared as private function. If it is so, changed it to public
2- Compile and test fn2 code to see if there are errors which could prevent the calling process.
3- Make sure that fn2 doesn't require parameters. If it does, then you need to provide.
4- Add “on error” statement to your code to trap the errors, if there are any, so you can know what the exact problem is.

Regards,
Jun 27 '12 #2
NeoPa
32,556 Expert Mod 16PB
I expect mod1.fn2 has not been declared as a Public procedure. If it isn't as simple as that then I suggest you include details of what happens when you try to run it. Simply saying it doesn't work is not something we'd expect from someone with over 100 posts to their name.
Jun 27 '12 #3
kkshansid
232 100+
both function run if i run them individually but in one call from another function only function first runs.i didnt declared it private but by default its public
Expand|Select|Wrap|Line Numbers
  1. sub f1
  2. 'some code
  3. end sub
  4. sub f2
  5. 'some code
  6. end sub
Jun 28 '12 #4
ahd2008
68
Brother, I have mentioned that u need to include your codes so we can help you. Also, you need to state exactly what the problem is.Also, When you said your fn2 cannot be called, describe what you get in run time!

Help us so we can help you
Jun 28 '12 #5
NeoPa
32,556 Expert Mod 16PB
NeoPa:
If it isn't as simple as that then I suggest you include details of what happens when you try to run it. Simply saying it doesn't work is not something we'd expect from someone with over 100 posts to their name.
Did you read the main part of what I posted? It seems such a waste of time and energy repeating myself.
Jun 29 '12 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Socrates | last post by:
Hello, I have a problem building and using an activeX dll. I would appreciate it if anyone could help: I have written some complex functions. I have a complex type with .real and ..imag part as...
4
by: Andreas Ntalakas | last post by:
hello is it possible to call functions implemented in a C# .dll from unmanaged C++ code Thank you
2
by: Edwin Knoppert | last post by:
Can i call functions of a win32.dll by pointer? It's in a ASP.NET (2.0) surrounding. I wonder if it's still possible to do this. (Using GetProcAddress() API and such) Thanks,
2
by: karspy | last post by:
In my COM Server i have added Dialog Box. i have registered OCX file and added that Activex Control to my Project also. It has created 1 header file and 1 source file. After that i have created...
2
by: tonytony24 | last post by:
Hi All: I was wondering if there's a simple way to call a MS Access Module through either Command Prompt MS Script any other way... Thanks for the response.
6
by: mygoogleaccount | last post by:
Hi, may be someone could help me ? i need to use cyrillic letters in a php application. I changed everything to UTF-8 and it works fine. The only problem are CYRILLIC SMALL LETTER ES...
21
by: Cottonwood | last post by:
I want to call a C module from a Fortran program. Whatever I tried - the linker could not find the C module. I know about the leading underscore and switched even that off. I abstracted everything...
2
by: Sydney | last post by:
Hi there I know this should be simple but I cant work out how to call a procedure from another module in .NET. I keep getting an error (Argument not specified for the parameter) Im using...
2
by: sanscrimson | last post by:
Hi! I just want to ask if it possible to call functions in parent window if the child window is created. Below is sample:...
10
by: Tom Plunket | last post by:
I've got a bunch of code that runs under a bunch of unit tests. It'd be really handy if when testing I could supply replacement functionality to verify that the right things get called without...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.