×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Executing EXCEL and VBA app using PowersShell

Executing EXCEL and VBA app using PowersShell

Executing EXCEL and VBA app using PowersShell

(OP)
I have three Excel apps using VBA and running into memory problems. The topmost app PPMS_SYSTEM is basically a Project control app which keeps track of project id's and project related attributes. The user selects a project and PPMS_SYSTEM creates a sheet which is to be passed onto one of the other sub apps EST_SYSTEM or RBS_SYSTEM. However upon trying to load EST_SYSTEM we run into insufficient memory. PPMS_SYSTEM is not unloaded until EST_SYSTEM is loaded. Both PPSM_SYSTEM and EST_SYSTEM function independently, except for the project sheet (20 cells only) to be passed from PPMS_SYSTEM to either the EST_STYSTEM or RBS_SYSTEM. I was contemplating using PowerShell to load PPMS_SYSTEM and create the Project ID data sheet as an ASCII file and then EXIT out of EXCEL and reload EXCEL and EST(or RBS)_SYSTEM and then read in the PROJECT ID ASCII file. Doing it in this way I avoid having both the PPMS_SYSTEM and EST(or RBS)_system in memory at the same time.

Does anyone have experience executing EXCEL and VBA programs using PowerShell. I am looking at a Powershell User Interface, whereby the user can select:

(a) from Windows, Powershell will be activated and load EXCEL and start the PPMS_SYSTEM, upon selection of a Project ID by the user, PPMS_SYSTEM creates the Project ID ASCII file and exits out of EXCEL (ie unloads EXCEL) and control is transferred back to Powershell
(b) Powershell loads EXCEL and the user can select either the EST_SYSTEM or the RBS_SYSTEM and add more project data
(c) when user has completed processing/adding/modifying project data, the user will exit out of Excel and return to Windows

RE: Executing EXCEL and VBA app using PowersShell

So, this has nothing to do with Visual Basic (Microsoft) VB.NET... ponder

But, since all of that is in VBA in Excel and you need to have Excel running for PPMS_SYSTEM, EST_SYSTEM or RBS_SYSTEM - why not just have a small Excel VBA app that:
  • Starts PPMS_SYSTEM
  • Gathers data per selected project id's
  • Closes PPMS_SYSTEM
  • Starts either EST_SYSTEM or RBS_SYSTEM
  • Does its magic
  • ...

---- Andy

"Hmm...they have the internet on computers now"--Homer Simpson

RE: Executing EXCEL and VBA app using PowersShell

(OP)
You are right I should have posted it to VB Office (Classic).

I thought of the same process you suggested. However, how can I access VBA to create the 'small Excel VBA app' (the driver app)to perform what you suggested.
I have no problem accessing or storing workbook/sheets across directories (ie: PPMS_SYSTEM, EST_SYSTEM and RBS_SYSTEM reside in different dirs).
How do I unload an app and release all associated memory to restore EXCEL to its original settings before loading another app. Also how can I make
the apps more efficient in terms of memory usage. I will post this on VB Office (Classic) as well

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close