473,503 Members | 3,045 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Help with function in Access

Hallo Newsgroup!
I am wanting to write a function using VBA - but I don't know why.
Please can someone help?

Andreas Schittlipz
Germany
Nov 12 '05 #1
3 1150
"Andreas Schittlipz" <an*****@schittlipz.com> wrote in message
news:bq**********@hercules.btinternet.com...
Hallo Newsgroup!
I am wanting to write a function using VBA - but I don't know why.
Please can someone help?


Simple example in a standard module...

Public Function AddTwoNumbers(FirstNum As Double, SecondNum As Double) As
Double
AddTwoNumbers = FirstNum + SecondNum
End Function

Testing in the Immediate pane of the debug window...

?AddTwoNumbers(12.5, 6.25) <Enter>
18.75

Of course for more complex functions you would also need error handling and
proper house cleaning code if you open any objects, etc..
--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com
Nov 12 '05 #2
"Rick Brandt" <ri*********@hotmail.com> wrote in message
news:bq*************@ID-98015.news.uni-berlin.de...
"Andreas Schittlipz" <an*****@schittlipz.com> wrote in message


You took Don P Mellon's bait, Rick.

Should have read it more carefully... he didn't ask "how", he asked "why" he
wanted to write a function in VBA.

It'll be interesting, I guess, to see if/how Mellon, aka Schittlipz, follows
up, now that he's "been busted."
Nov 12 '05 #3
"Larry Linson" <bo*****@localhost.not> wrote in message
news:MI***************@nwrddc01.gnilink.net...
"Rick Brandt" <ri*********@hotmail.com> wrote in message
news:bq*************@ID-98015.news.uni-berlin.de...
"Andreas Schittlipz" <an*****@schittlipz.com> wrote in message


You took Don P Mellon's bait, Rick.

Should have read it more carefully... he didn't ask "how", he asked "why" he
wanted to write a function in VBA.

It'll be interesting, I guess, to see if/how Mellon, aka Schittlipz, follows
up, now that he's "been busted."


I saw the "why" and assumed it was a second language goof. Oh well.
--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com
Nov 12 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
2741
by: Jim Hubbard | last post by:
I have some C# code that is supposed to wrap the defrag APIs and I am trying to convert it to VB.Net (2003). But, I keep having problems. The C# code is relatively short, so I'll post it...
5
2123
by: xuatla | last post by:
Hi, I encountered the following compile error of c++ and hope to get your help. test2.cpp: In member function `CTest CTest::operator+=(CTest&)': test2.cpp:79: error: no match for 'operator='...
8
5451
by: baustin75 | last post by:
Posted: Mon Oct 03, 2005 1:41 pm Post subject: cannot mail() in ie only when debugging in php designer 2005 -------------------------------------------------------------------------------- ...
9
2399
by: hope | last post by:
Hi Access 97 I'm lost on this code please can you help ================================= Below is some simple code that will concatenate a single field's value from multiple records into a...
9
6299
by: | last post by:
Hi All, I have allready tried to ask a similar question , but got no answer until now. In the meantime, I found, that I cannot understand some thread-settings for the Main() function . If I use...
6
4959
by: James Radke | last post by:
Hello, I have a multithreaded windows NT service application (vb.net 2003) that I am working on (my first one), which reads a message queue and creates multiple threads to perform the processing...
2
1584
by: duncanblacksmithmath | last post by:
I know a lot of you have seen this before but I have worked on the program and have gotten it to work thus far but I need help getting these two functions to work and implementing them. Here is...
1
3694
by: Rahul | last post by:
Hi Everybody I have some problem in my script. please help me. This is script file. I have one *.inq file. I want run this script in XML files. But this script errors shows . If u want i am...
32
12471
by: robert d via AccessMonster.com | last post by:
I'm looking at converting DAO to ADO in my app. All of my DAO connections are of the following structure: Dim wsName As DAO.Workspace Dim dbName As DAO.Database Dim rsName As DAO.Recordset ...
6
4002
by: JonathanOrlev | last post by:
Hello everyone, I have a newbe question: In Access (2003) VBA, what is the difference between a Module and a Class Module in the VBA development environment? If I remember correctly, new...
0
7264
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7316
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7449
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5562
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4992
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4666
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3148
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1495
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
371
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.