?
Solved

Need to fill up a Text Area.

Posted on 2012-03-22
8
Medium Priority
?
1,559 Views
Last Modified: 2012-04-09
Hi Team,

I am trying to fill text in the Text area of the given below page using Excel VBA.  Please help me with the same.  I am not able to fill this up.

http://www.adfreeclassifieds.com/publish-a-new-ad.htm 

Given below is the screen shot of the website part which I want to fill up.
Sample Screen shot
Given below is some of the sample code that I was able to find using google search.   but is does not seem to work.

    Set objCollection = ie.document.getElementsByTagName("textarea")
    i = 0
    While i < objCollection.Length
        If objCollection(i).Name = "description" Then
            objCollection(i).onmouseclick
            objCollection(i).Value = "Sandesh" & vbCrLf
            Set objElement = objCollection(i)
            objElement.Click
        End If
        i = i + 1
    Wend

Please advise how do I achive the same.

Thanks,
Sandesh.
0
Comment
Question by:Sandesh555
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 29

Assisted Solution

by:pwindell
pwindell earned 300 total points
ID: 37767573
If there are not multiple Controls then you don't need a Collection.
You explicitly direct it at the Text Area control.
NameOfControl.Value = "Sandesh" & vbCrLf

I doubt you want to do it based on a MouseClick event either.  If this is all Client-side then maybe on an OnLoad Event.  But if it is Server-Side then you would put the data in a Server-Side Variable and then push it into the Client-Side code from the variable as it is being processed and sent to user's browser.

On top of that an HTML Text Area does not have a Toolbar,...so you are using a Control created by someone else (3rd party),...so you need to verify with the people it comes from exactly how it is done.  They may have handled it in a straight forward way,..and then again maybe they didn't.
0
 

Author Comment

by:Sandesh555
ID: 37791382
Hi,

The web page link given can be accessed by all.  So request you to please try and see if you can give me some sample code to get connected.  As anyone can access the site, you can even see what works best.

Thanks,
Sandesh.
0
 
LVL 111

Assisted Solution

by:Ray Paseur
Ray Paseur earned 300 total points
ID: 37798214
Why are you trying to do this?  I do not think you can "fill up" an HTML textarea in a POST-method form.  I think it will take everything you put into it.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 82

Accepted Solution

by:
David Johnson, CD, MVP earned 600 total points
ID: 37798266
The site seems to be working properly?
Is this an excel problem? if so why are you redirecting us to a website?

Is it a website problem?

Are you trying to automate posting on this website?

Are you the website owner and need to populate your database?

Request Advise
0
 
LVL 16

Assisted Solution

by:theo kouwenhoven
theo kouwenhoven earned 300 total points
ID: 37799489
Hi  Sandesh555,

I don't think you will ever be able to reach this result, the size of the objCollection.Length will change every time you add an vbCrLf so what you try to do is the same as:
 While i < i+1 :-)

You probably have to store the value first
Set MyVar = objCollection.Length
While i < objCollection.Length
-
-
-
Whend


While i < objCollection.Length you wil
0
 
LVL 82

Assisted Solution

by:David Johnson, CD, MVP
David Johnson, CD, MVP earned 600 total points
ID: 37799558
do not think you can "fill up" an HTML textarea in a POST-method form Agreed, though eventually you will get an overflow condition.
0
 

Author Comment

by:Sandesh555
ID: 37805269
Hi Team,

To answer your questions, I am trying to fill up the given Website based on the data avalible in Excel file using VBA.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
This article describes a serious pitfall that can happen when deleting shapes using VBA.
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

800 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question