Results 1 to 3 of 3
  1. #1
    redbull's Avatar
    redbull is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Mar 2012
    Location
    Missouri
    Posts
    480

    Trim first 13 characters, Cut It Out

    I have an IE element that VBA is able to read without any issue.



    oIe.Document.all.tags("p").Item(0).innerhtml

    So to shorten things up.. I did this

    GenPin = oIe.Document.all.tags("p").Item(0).innerhtml

    So for future reference in this sub, I can just say GenPin when I need that element. Here is the problem though.

    That element has what I need, but the first 13 characters need to be dropped. I have been trying trims, and ltrims and everything I cannot get it to work. Hopefully a quick fix, I am just at a loss

    And for your viewing pleasure...

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    "Have mercy!"

    Did you try:

    Mid(oIe.Document.all.tags("p").Item(0).innerhtml, 14)
    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.

  3. #3
    redbull's Avatar
    redbull is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Mar 2012
    Location
    Missouri
    Posts
    480
    June, once again you saved my bacon. Lesson I learned, Always use mid.


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

Similar Threads

  1. Replies: 9
    Last Post: 02-11-2013, 03:09 PM
  2. Trim!
    By redbull in forum Programming
    Replies: 9
    Last Post: 11-06-2012, 06:01 AM
  3. Trim vba
    By shexe in forum Access
    Replies: 5
    Last Post: 11-16-2011, 10:20 AM
  4. Trim value
    By dada in forum Programming
    Replies: 5
    Last Post: 09-02-2010, 11:01 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