View Full Version : Solved: Call .vbp from an access DB
austenr
10-03-2006, 11:21 AM
Is it possible to call a VB program from an access DB? If so could someone post an example? Thanks
mvidas
10-03-2006, 12:54 PM
Hi Austen,
A .vbp file is just a project file, VBA wouldn't be able to do anything with it (unless you wanted to see what files were involved in a project). It is really just a text file that gives details about the project (type, references, components, properties, etc)
What is it you want to do?
Matt
austenr
10-03-2006, 01:02 PM
Hi Matt,
I was left with someone elses mess. This bonehead took everything out of Access and converted it to SQL Server, Stored Procedures and very complex VB programs. Now I have the daunting task of either making his stuff run with calls from Access or rewriting the whole mess which in my estimation could take months. I found info on Stored Procedures so I might be able to figure that out. The bosses want it put back into Access the way it was before he showed up. He claimed Access was not reliable and produced bogus results.
Anyway, they want a switchboard developed to do the monthly update which now consists of the above. So I thought if I had to re-engineer this (the thought of which makes me ill), in the mean time I could give them part of what they wanted by at least giving the switchboard and calls to everything else.
mvidas
10-03-2006, 01:09 PM
Sounds like fun :) Sounds like those people that say "excel is inconsistent, doesn't always give the same answer twice" but then have 3 spelling errors in each sentence they write (and also use the CHOOCE formula but don't understand why they have the #NAME! error). But I'm straying off topic
As for stored procedures, you can still call them from VBA. Take a look at http://www.experts-exchange.com/Q_22011548.html for an example of the syntax using ADO (refers to excel but since you're familiar with excel you can take the 'cells' portion out and replace it with access stuff).
As for the .vbp, do you have VB on your computer there that you could see what it consists of? VB is not much different than VBA, I would assume you could still figure out what it is doing (start with the "Form_Load" event sub if there is only one form).
austenr
10-03-2006, 01:14 PM
Thanks Matt. Yes I have VB installed. Could probably convert it with some (actually a lot of effort). This guy was something else. He also left no doco so I am really flying blind. He said he has a Phd in CS but said he got it off of the internet. Probably downloaded a diploma and put his name on it. :devil2:
BTW, is experts exchange worth the investment or do you know?
mvidas
10-03-2006, 02:04 PM
Probably downloaded a diploma and put his name on it. :devil2:LOL!
BTW, is experts exchange worth the investment or do you know?
I've never paid them a dime, though I see people saying all the time that it is worth it. It is worth it for me, since you get 'points' for answering questions correctly, and with enough points (a couple correct answers a month) you get a free subscription (I've had a free one since march 04 when I started answering questions). The format isn't as nice (imo) as a forum like this, but you usually get a lot more people looking at your questions and a wider answerer base (sometimes not good, when people are only looking for points and not looking to help). It is good as another resource, but I don't think I'd like it if it were my only resource.
As someone looking to help (as I am), it is nice merely because of the amount of new questions being asked.
austenr
10-04-2006, 07:14 AM
Thanks Matt.
mvidas
10-04-2006, 07:22 AM
That guy really had no idea, did he?
This section of code:Dim lclWkshDetail As String
Dim lclWkshDetailThis As String
Dim lclWkshHideDetailAppear As String
Dim lclWkshHideTotalAppear As String
Dim lclWkshName As String
Dim lclWkshNbr As Long
Dim lclWkshSrc As Excel.Worksheet
Dim lclWkshSrc1 As Excel.Worksheet
Dim lclWkshSrc2 As Excel.Worksheet
Dim lclWkshSrc3 As Excel.Worksheet
Dim lclWkshSrc4 As Excel.Worksheet
Dim lclWkshSrc5 As Excel.Worksheet
Dim lclWkshSummary As String
Dim lclWkshSummaryThis As String
Dim lclWkshTgt As Excel.Worksheet
Dim lclWkshTgt1 As Excel.Worksheet
Dim lclWkshTgt2 As Excel.Worksheet
Dim lclWkshTgt3 As Excel.Worksheet
Dim lclWkshTgt4 As Excel.Worksheet
Dim lclWkshTgt5 As Excel.WorksheetDoesn't appear to be used anywhere there. Somewhere (in one of the modules, I would assume) is a routine that uses these and does something with excel. I would take a guess and say you could comment/delete these lines out, and just replace the excel related routine(s) with access ones.
austenr
10-04-2006, 07:25 AM
Well he had an idea....One that I cannot say on this public board. :motz2:
austenr
10-05-2006, 12:09 PM
Here it is.
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.