+ Reply to Thread
Results 1 to 4 of 4

Shell command

  1. #1
    Forum Contributor
    Join Date
    02-20-2017
    Location
    Indiana
    MS-Off Ver
    2016
    Posts
    101

    Shell command

    Hello,

    I'm using the shell command to run a VBscript in my VBA. I'm getting the error Variable not defined.

    Please Login or Register  to view this content.
    The compiler thinks that I'm trying to define x, but this is how the function worked I thought.
    Can someone explain?

  2. #2
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: Shell command

    May be there is this statement at the first of module
    Option Explicit
    Remove this line or it is better to declare x in this way
    Please Login or Register  to view this content.
    < ----- Please click the little star * next to add reputation if my post helps you
    Visit Forum : From Here

  3. #3
    Forum Contributor
    Join Date
    02-20-2017
    Location
    Indiana
    MS-Off Ver
    2016
    Posts
    101

    Re: Shell command

    Quote Originally Posted by YasserKhalil View Post
    May be there is this statement at the first of module
    Option Explicit
    Remove this line or it is better to declare x in this way
    Please Login or Register  to view this content.
    Yep, worked like a charm. Thanks!!

  4. #4
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: Shell command

    You're welcome. Glad I can offer some help

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Shell command to rum dos copy command on vba
    By lepmor in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-17-2015, 07:04 PM
  2. Shell command in VBA ?
    By RustyNail in forum Excel General
    Replies: 3
    Last Post: 04-26-2015, 10:46 PM
  3. VBA Shell command
    By sumanc_nitr in forum Excel Programming / VBA / Macros
    Replies: 28
    Last Post: 03-06-2014, 07:04 AM
  4. Using macro to execute a command in Shell Command
    By aadarsh in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-19-2010, 07:06 PM
  5. Shell command help
    By ramathiam in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-17-2007, 10:37 PM
  6. Shell command
    By Viktor Ygdorff in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-13-2006, 12:45 PM
  7. [SOLVED] Help with shell command
    By St in forum Excel General
    Replies: 3
    Last Post: 11-04-2005, 10:45 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1