473,397 Members | 2,116 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,397 software developers and data experts.

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 2558
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*********@tiscali.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********@RemoveThis.shaw.ca> wrote in message news:<eRqxb.509411$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*********@tiscali.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
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...
2
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...
5
by: Mike Oliszewski | last post by:
Given the following c# code: namespace Company2 { public class SomeFunctions { public void FunctionA() { // Do Something. }
4
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...
3
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...
2
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...
14
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...
3
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 =...
10
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...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...
0
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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,...
0
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...

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.