Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 549015
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T11:08:25+00:00 2026-05-13T11:08:25+00:00

I want to run a Perl script at the click of a button inside

  • 0

I want to run a Perl script at the click of a button inside an Excel spreadsheet.

As the button is assigned to execute a VB macro, the macro should effectively execute the program.

As my first ever VB script, this is what I came up with, which throws up an irritating Run-time error '424': Object required error.

Sub RunPerlScript()
    System.Diagnostics.process.Start ("perlscript.pl")
End Sub

How can I get this script to do what I want it to do?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T11:08:25+00:00Added an answer on May 13, 2026 at 11:08 am

    You cannot use .NET classes in a VBA macro.

    Use the VBA Shell function.

    Shell "p:\ath\to\perlscript.pl"
    

    The documentation:

    Shell Function

    Runs an executable program and returns
    a Variant (Double) representing the
    program’s task ID if successful,
    otherwise it returns zero.

    Syntax

    Shell(pathname[,windowstyle])

    The Shell function syntax has these
    named arguments:

    Part Description pathname Required;
    Variant (String). Name of the program
    to execute and any required arguments
    or command-line switches; may include
    directory or folder and drive. On the
    Macintosh, you can use the MacID
    function to specify an application’s
    signature instead of its name. The
    following example uses the signature
    for Microsoft Word: Shell
    MacID(“MSWD”) windowstyle Optional.
    Variant (Integer) corresponding to the
    style of the window in which the
    program is to be run. If windowstyle
    is omitted, the program is started
    minimized with focus. On the Macintosh
    (System 7.0 or later), windowstyle
    only determines whether or not the
    application gets the focus when it is
    run.

    The windowstyle named argument has
    these values:

    Constant Value Description vbHide 0
    Window is hidden and focus is passed
    to the hidden window. The vbHide
    constant is not applicable on
    Macintosh platforms. vbNormalFocus 1
    Window has focus and is restored to
    its original size and position.
    vbMinimizedFocus 2 Window is displayed
    as an icon with focus.
    vbMaximizedFocus 3 Window is maximized
    with focus. vbNormalNoFocus 4 Window
    is restored to its most recent size
    and position. The currently active
    window remains active.
    vbMinimizedNoFocus 6 Window is
    displayed as an icon. The currently
    active window remains active.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Inside a Perl script, I want to run a Java program that takes in
I want another developer to run a Perl script I have written. The script
I have a Perl script which I want to run every 4 hours through
I want run a script as follows: runner: ssh 'java program &' ssh 'java
I want to run my perl script< ftp_files_copy.pl> on windows through batch file<Run_perl_script.bat> at
I want to execute a perl script every week or so. I've looked at
I need to run Perl script by cron periodically (~every 3-5 minutes). I want
I want to run a Perl script with some while(1) loop in the background
I want to run a Perl script online, but I don't know how. In
I'm new to Perl and want to know of a way to run an

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.