+ Reply to Thread
Results 1 to 4 of 4

Invalid Procedure Call or Argument?

Hybrid View

aloha31 Invalid Procedure Call or... 07-19-2013, 07:37 PM
TMS Re: Invalid Procedure Call or... 07-19-2013, 07:49 PM
aloha31 Re: Invalid Procedure Call or... 07-19-2013, 08:04 PM
TMS Re: Invalid Procedure Call or... 07-19-2013, 08:24 PM
  1. #1
    Forum Contributor
    Join Date
    07-12-2013
    Location
    Los angeles, CA
    MS-Off Ver
    Excel 2007
    Posts
    109

    Invalid Procedure Call or Argument?

        If InStr(cell.Text, "x") > 0 Then
            strText = Trim(cell.Text)
            cell = Left(strText, n - 5) & ":" & Left(Right(strText, 4), 2) & " AM"
            cell.NumberFormat = "h:mm AM/PM"
            cell.Font.bold = True
        End If
    Could someone help me debug this error?

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,580

    Re: Invalid Procedure Call or Argument?

    What's in "n"?.


    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Contributor
    Join Date
    07-12-2013
    Location
    Los angeles, CA
    MS-Off Ver
    Excel 2007
    Posts
    109

    Re: Invalid Procedure Call or Argument?

    n= len(trim(cell.text))

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,580

    Re: Invalid Procedure Call or Argument?

    Is it 5 or less?

    You know, we can't really guess what the rest of the code does, or what it's doing it to ...


    Regards, TMS

+ 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. Invalid procedure call or argument
    By krish T in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-31-2010, 10:01 AM
  2. Invalid procedure call or argument
    By mqdias in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 11-08-2007, 06:01 AM
  3. Invalid procedure call or argument error
    By Patrick Simonds in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-12-2006, 06:45 PM
  4. Invalid Procedure call or argument
    By T De Villiers in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-25-2006, 10:05 AM
  5. Shell Invalid Procedure call or argument
    By rgans in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-05-2005, 12:23 PM

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