Solved

Need to fill up a Text Area.

Posted on 2012-03-22
8
1,518 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
8 Comments
 
LVL 29

Assisted Solution

by:pwindell
pwindell earned 100 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 108

Assisted Solution

by:Ray Paseur
Ray Paseur earned 100 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 79

Accepted Solution

by:
David Johnson, CD, MVP earned 200 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 100 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 79

Assisted Solution

by:David Johnson, CD, MVP
David Johnson, CD, MVP earned 200 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Preface There are many applications where some computing systems need have their system clocks running synchronized within a small margin and eventually need to be in sync with the global time. There are different solutions for this, i.e. the W3…
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…

863 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now