+ Reply to Thread
Results 1 to 5 of 5

Control IE website's "TEXTAREA" - Read & Replace value with VBA in excel.

  1. #1
    Forum Contributor
    Join Date
    07-28-2008
    Location
    Leamington Spa, UK
    MS-Off Ver
    2010
    Posts
    142

    Question Control IE website's "TEXTAREA" - Read & Replace value with VBA in excel.

    Hi All,

    I am using vba to navigate internet explorer 8 (IE) to a webpage then find a HTML "textarea" then read and replace the value in this text area with a variable from my macro.

    So far I have the following that works (see below) - The problem is that I cannot replace the "textarea" value. I can select the text area and read the value but not write to it.


    Please Login or Register  to view this content.
    I can get round the above using sendkeys but I am having all sorts of issues with this method - It jumbles and adds letters to my predefined Variable - Sometimes it works, most times it doesn't e.g.

    Var1 = "LTest"
    the Sendkeys version (or one of them) => "LLLTesst"

    Anyone provide any input in how to write a value to the text area??

    I have tried so far with no luck - The following dont do anything...
    Please Login or Register  to view this content.
    Thanks in advance...

  2. #2
    Valued Forum Contributor
    Join Date
    05-21-2009
    Location
    Great Britain
    MS-Off Ver
    Excel 2003
    Posts
    550

    Re: Control IE website's "TEXTAREA" - Read & Replace value with VBA in excel.

    If you can read the current textarea value, then try 1 or 2 should work, but not if the readonly attribute is set. Without knowing the URL or the HTML it's difficult to help further. Try writing code for this page - http://www.tizag.com/htmlT/htmltextarea.php.
    Post responsibly. Search for excelforum.com

  3. #3
    Forum Contributor
    Join Date
    07-28-2008
    Location
    Leamington Spa, UK
    MS-Off Ver
    2010
    Posts
    142

    Re: Control IE website's "TEXTAREA" - Read & Replace value with VBA in excel.

    I did reply to this but it seemly did not work - ended up with a blank page!

    *

    Thanks for your reply Chippy.

    *

    Bit more info around the issue. Its a Sharepoint Site (2007) and I am trying to automate the people picker to add new users to a permissions group.

    With regard to read and write - It has never thrown up an issues in the macro reading the textarea value, but as this starts out life empty it always simply returns "". The fact that you can click the text area and input (type) a user into the area surely means its definitely not 'readonly'? HTML below...

  4. #4
    Registered User
    Join Date
    03-19-2013
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Control IE website's "TEXTAREA" - Read & Replace value with VBA in excel.

    I have the same problem. Can't believe there is no solution for this in VBA.
    Anyone can help with the correct code?

  5. #5
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,167

    Re: Control IE website's "TEXTAREA" - Read & Replace value with VBA in excel.

    btc5,

    This thread is more than a year old. You will get faster replies if you create your own thread.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ 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