+ Reply to Thread
Results 1 to 3 of 3

Macro doesn't run...

  1. #1
    Registered User
    Join Date
    03-15-2006
    Posts
    14

    Unhappy Macro doesn't run...

    Hi everybody,

    I have a small Makro, but it doesn't run... :-(

    The Makro is supposed to look up the IP-Adress which it finds in the Logfile in a EXCEL-woksheet and take the corresponding CustomerID and write it into a NEW logfile.
    NOW, somehow I get an Error like Runtime-Error 5: Invalid procedure or argument

    I am not good with VBA, so I actually don't understand what I do wrong.... :-(

    Please Login or Register  to view this content.
    Inside the code I marked where the error occurs....

    THANKS!!

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259
    Hello JVLennox,

    You don't mention what error you're getting, but I suspect that sPos is returning a zero at some point during the file read. If you have lines in the file that don't contain the search string " - - ", sPos will be zero. Place a breakpoint at this line in your code:

    sKdNr = KdNrSuchen(Mid(sText, 1, sPos - 1))

    Check the value sPos and then press F5 to step through your loop.

    Sincerely,
    Leith Ross

  3. #3
    Registered User
    Join Date
    03-15-2006
    Posts
    14
    Wow, I guess I was blind... :-)
    Well, thats what happens :-)

    Thanks!

+ Reply to Thread

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