Results 1 to 2 of 2
  1. #1
    shabar is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jan 2013
    Posts
    66

    How Trim work in Excel VBA

    I have got following code for get rid of middle spaces, line feed and Trim
    But Trim doesn't work What could be the reason
    Hi All




    I have got following code for get rid of middle spaces, line feed and Trim


    But Trim doesn't work What could be the reason


    Sub Replace()




    With Sheets("Input_Data").Range("A1:A6300")
    'With Sheets("Input_Limits").Range("A1:A6300")

    .Cells.Replace " ", " ", xlPart, xlByRows, False
    .Cells.Replace vbLf, "", xlPart, xlByRows, False
    '.Cells.Trim


    End With

    End Sub







    It gives Error- Object doesn't support this property method
    Cheers
    Shabar

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Trim!
    By redbull in forum Programming
    Replies: 9
    Last Post: 11-06-2012, 06:01 AM
  2. Trim vba
    By shexe in forum Access
    Replies: 5
    Last Post: 11-16-2011, 10:20 AM
  3. Replies: 4
    Last Post: 07-26-2011, 12:33 AM
  4. Import Excel into access does not work
    By hawg1 in forum Import/Export Data
    Replies: 1
    Last Post: 05-28-2010, 12:05 PM
  5. Trim
    By JMantei in forum Forms
    Replies: 1
    Last Post: 06-20-2006, 02:06 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums