?
Solved

MORE ON VBA

Posted on 2003-03-27
10
Medium Priority
?
285 Views
Last Modified: 2010-05-01
Hi, VBA (Visual Basic for Applicationns.) Ok.... heres where i stand. I have a program written in vb, that i need to be loaded by some VBA code. The 'Shell' command doesn't appear to work. Does anyone know how to make a VB program load,with a code in VBA? Please have a brainstorm for me a.s.a.p! Thanks!
0
Comment
Question by:beauvoir2
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
10 Comments
 
LVL 14

Expert Comment

by:aelatik
ID: 8220691
Shell has to work, show your code :

Try :

Shell "notepad.exe"

and see what happens...
0
 

Author Comment

by:beauvoir2
ID: 8223055
Shell works in VB, but it doesnt seem to work in VBA. Ill try it again!
0
 

Author Comment

by:beauvoir2
ID: 8223180
Nope.... Shell definately doesnt work! Please try and come up with an alternative command! Thanks
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 2

Accepted Solution

by:
nschulz777 earned 75 total points
ID: 8223228
I had a help file written once in powerpoint which I called from msaccess with this function, worked for me, PPPath was the Powerpoint .exe path, hlppath was the .pps file path, the sendkeys commands started the slideshow:
Function PPHelp()
Dim PPPath As String
Dim HlpPath As String
Dim strfile As String
PPPath = Forms![Job Setup]!PowerPointPath
HlpPath = Forms![Job Setup]!HelpPath
strfile = PPPath & Chr(32) & Chr(34) & HlpPath & Chr(34)
Dim RetVal
RetVal = Shell(strfile, 1)
SendKeys "%{e}", True
SendKeys "%{d}", True
SendKeys "v", True
End Function
0
 
LVL 5

Expert Comment

by:Rhaedes
ID: 8223968
Shell DOES work from VBA. I have a VBA program in Word 2000 which makes great use of it. What Office application/version are you using?
0
 

Author Comment

by:beauvoir2
ID: 8224523
Im using Office XP, and Access, but for some reason it Doesn't wanna work :'(
0
 
LVL 5

Expert Comment

by:Rhaedes
ID: 8225911
Please post your code!
0
 

Author Comment

by:beauvoir2
ID: 8226697
I dont have any code, which is my problem.... all i need is to no how to loada a prog
0
 

Author Comment

by:beauvoir2
ID: 8226721
Hang on... i think ive sussed it!
0
 

Expert Comment

by:CleanupPing
ID: 8531480
Hi beauvoir2,
This old question (QID 20565637) needs to be finalized -- accept an answer, split points, or get a refund.  Please see http://www.cityofangels.com/Experts/Closing.htm for information and options.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses
Course of the Month13 days, 21 hours left to enroll

800 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question