Results 1 to 4 of 4

Executing procedures with multiple arguments

Threaded View

ferfer Executing procedures with... 09-20-2012, 03:51 AM
ferfer Re: Executing procedures with... 09-20-2012, 04:51 AM
Cutter Re: Executing procedures with... 09-20-2012, 10:38 AM
ferfer Re: Executing procedures with... 09-21-2012, 03:40 AM
  1. #1
    Registered User
    Join Date
    09-20-2012
    Location
    Switzerland
    MS-Off Ver
    Excel 2007
    Posts
    5

    Unhappy Executing procedures with multiple arguments

    Hi,
    I have two modules:

    Module 2 - where i've defined
    Public Sub Workbook_Open(v_fileName As String, MyDir As String)
    .....
    end
    Module 1 - where I will call the procedure defined in Module 2
    Sub DirLoop()
    
          Dim MyFile As String, Sep As String
    
         MyDir = InputBox(Prompt:="Enter folder path", _
              Title:="Folder Path", Default:="")
              
          If Sep = "\" Then
             ' Windows platform search syntax.
              MyFile = Dir(MyDir & Sep & "*.xlsx")
          End If
    
          Do While MyFile <> ""
    
              Workbook_Open(MyDir & Sep & MyFile, MyDir)
              MyFile = Dir()
                     
          Loop
    
    End Sub
    but when executing the module 1 I have a syntax error message. What I'm doing wrong?
    Thank You
    Last edited by Cutter; 09-20-2012 at 10:36 AM. Reason: Added code tags

Thread Information

Users Browsing this Thread

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

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