+ Reply to Thread
Results 1 to 1 of 1

Unable to execute sub procedure with 2 arguments (compile error)

  1. #1
    Registered User
    Join Date
    04-06-2010
    Location
    NY
    MS-Off Ver
    Excel 2007
    Posts
    7

    Unable to execute sub procedure with 2 arguments (compile error)

    I must be missing something very simple here... Here is a snipet of the code which is giving me a compile error http://i.imgur.com/5lLOf.png

    I am trying to run a sub procedure which imports data from csv files called "ImportVar1Data". This procedure works flawlessly having the variable "i" as a single argument. When I try passing in a second argument "Var1" which is simply a string value, I get the compile error. Is there something special that needs to be done when trying to use a variable holding a string value as an argument?

    EDIT: Yeah I was missing something very simple... I needed to put a "Call" before invoking the sub procedure. Apparently you need to use the Call command when invoking sub procedures with multiple arguments. I'm still pretty new to VBA lol
    Last edited by ath1337; 12-21-2011 at 02:35 PM. Reason: Solved

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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