473,626 Members | 3,031 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Accessing a VBA module from VB.Net/CSharp

Hi,

This does sound like a bit of a weird thing to ask so I
will state my question and then further down explain why
I am trying to do it. So if you have the answer then
reply! Or if you understand what I am trying to do and
can suggest a better solution then reply also!

Question
--------
I want to run a VBA code module from either
VB/VB.NET/C#. How can I go about calling the call module?

Why
---

I have an MS Access project that is hooked up with SQL-
MSDE. I have developed a complex and nice looking
report. What I want to do is let my work colleges view
it over the internal intranet. The Data Access Pages
doesn't seem to work - Access throws a fit over the
calulated fields. In Access though you can use the
ExportXML feature and it creates the XML files that can
be viewed in any web browser. So I have written a code
module that does this in the Access project. I then want
to run this and the XMl files will get updated. Simple
request I thought..

Any help, as always, greatly appreciated.

cheers
Mike

Jul 21 '05 #1
2 2584
You can only run VBA code inside that Application, MS Access in your case.
You can have your .NET App start your Access project though COM automation
and use DoCmd.RunMacro to execute the VBA code you want to run. Also, user
of your app is also required to have MS Access installed. So, the question
could be, now that MS Access is installed, why not have everyone run the MS
Access project for the reports directly? (That is what I did in our small
network- 20 computers/users. I created our main business desktop apps in
..NET with MSDE backend and put all data reporting fuctionality in a MS
Access project, just because of MS Access is avialable on everyone's
computer and MS Access' reporting functionalities are very good, when
working with SQL Server/MSDE (much better than Crystal Report.NET, IMO).

<mi*********@ti scali.co.uk> wrote in message
news:00******** *************** *****@phx.gbl.. .
Hi,

This does sound like a bit of a weird thing to ask so I
will state my question and then further down explain why
I am trying to do it. So if you have the answer then
reply! Or if you understand what I am trying to do and
can suggest a better solution then reply also!

Question
--------
I want to run a VBA code module from either
VB/VB.NET/C#. How can I go about calling the call module?

Why
---

I have an MS Access project that is hooked up with SQL-
MSDE. I have developed a complex and nice looking
report. What I want to do is let my work colleges view
it over the internal intranet. The Data Access Pages
doesn't seem to work - Access throws a fit over the
calulated fields. In Access though you can use the
ExportXML feature and it creates the XML files that can
be viewed in any web browser. So I have written a code
module that does this in the Access project. I then want
to run this and the XMl files will get updated. Simple
request I thought..

Any help, as always, greatly appreciated.

cheers
Mike

Jul 21 '05 #2
Norman,

Thanks for that. I can see what you are saying, I think I will have to
go with Access/SQL project. I haven't expierence of Crystal
Reports.NET so I won't comment!

Cheers
mike

"Norman Yuan" <no********@Rem oveThis.shaw.ca > wrote in message news:<eRqxb.509 411$9l5.283459@ pd7tw2no>...
You can only run VBA code inside that Application, MS Access in your case.
You can have your .NET App start your Access project though COM automation
and use DoCmd.RunMacro to execute the VBA code you want to run. Also, user
of your app is also required to have MS Access installed. So, the question
could be, now that MS Access is installed, why not have everyone run the MS
Access project for the reports directly? (That is what I did in our small
network- 20 computers/users. I created our main business desktop apps in
.NET with MSDE backend and put all data reporting fuctionality in a MS
Access project, just because of MS Access is avialable on everyone's
computer and MS Access' reporting functionalities are very good, when
working with SQL Server/MSDE (much better than Crystal Report.NET, IMO).

<mi*********@ti scali.co.uk> wrote in message
news:00******** *************** *****@phx.gbl.. .
Hi,

This does sound like a bit of a weird thing to ask so I
will state my question and then further down explain why
I am trying to do it. So if you have the answer then
reply! Or if you understand what I am trying to do and
can suggest a better solution then reply also!

Question
--------
I want to run a VBA code module from either
VB/VB.NET/C#. How can I go about calling the call module?

Why
---

I have an MS Access project that is hooked up with SQL-
MSDE. I have developed a complex and nice looking
report. What I want to do is let my work colleges view
it over the internal intranet. The Data Access Pages
doesn't seem to work - Access throws a fit over the
calulated fields. In Access though you can use the
ExportXML feature and it creates the XML files that can
be viewed in any web browser. So I have written a code
module that does this in the Access project. I then want
to run this and the XMl files will get updated. Simple
request I thought..

Any help, as always, greatly appreciated.

cheers
Mike

Jul 21 '05 #3

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

Similar topics

1
1714
by: Mustafa | last post by:
dear sir In my vb.net window application i have the MDI form MainMDI and child form form1 adn module as MainModule In my MainMDI Parent form i have one toolbar i.e. tbraction. I am trying to show the toolbar when i am displaying form1 (child form) . when i close the child form i want it to be hiddeni.e. invisible i wrote the code in MainModule as Friend Module MainModule Friend frmMDI As MainMDI
2
6978
by: msnews.microsoft.com | last post by:
How can we access an internal class in a referenced file in a multi-file assembly. All documentation states the obvious purpose of the internal keyword on a class, but when referencing an assembly, I fear it means single-file assembly. That means even if the assembly is strong-named and versioned, it will not reach internal classes. So much for code reuse while hiding classes from external objects. I can't find examples or explanations...
5
2460
by: Mike Oliszewski | last post by:
Given the following c# code: namespace Company2 { public class SomeFunctions { public void FunctionA() { // Do Something. }
4
4871
by: Eugen Walcher | last post by:
Hello all, I've tried posting this same question on other newsgroups with no luck. This group seems to have a lot more activity so I apologize if you have seen it before. I'm trying to create a web service in c# using paradox data. The data is stored locally on my development machine with IIS also installed. Web services are working to the point where I can return strings and ints using Access2000 data but whenever I try and...
3
2789
by: Vivek Sharma | last post by:
Hi, I have created a dropdownlist as a web user control. I am using its multiple instances on the webpage. How do I access the selectedValue of each instance? All the instances have different IDs. Thanks Vivek
2
263
by: | last post by:
Hi, This does sound like a bit of a weird thing to ask so I will state my question and then further down explain why I am trying to do it. So if you have the answer then reply! Or if you understand what I am trying to do and can suggest a better solution then reply also! Question --------
14
3880
by: James Thiele | last post by:
I'd like to access the name of a function from inside the function. My first idea didn't work. >>> def foo(): .... print func_name .... >>> foo() Traceback (most recent call last): File "<stdin>", line 1, in ? File "<stdin>", line 2, in foo
3
2694
by: Mitko Haralanov | last post by:
I have a Python module that I have written using the C API and I am having a problem accessing a dictionary from that module. Here is what I have done: 1. In my init function I call module = Py_InitModule ("name", methods); 2. then I get the module's __dict__ structure: dict = PyModule_GetDict (module); 3. Later, I insert a dictionary that I have constructed using the PyDict_* API
10
9755
by: Anton | last post by:
Hi, when accessing a secured 3rd party webservice i'm getting a 401 HTTP Statuscode (unauthorized). When entering the url in a browser and entering the username and password manually, the wsdl is returned. So the username and password should be ok. I'm using this code: Merchant myMerch = new Merchant(); myMerch.merchantIdentifier=merchantId;
0
8637
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8502
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7192
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6122
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5571
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4090
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4196
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2623
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 we have to send another system
2
1507
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.