Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Need to fill up a Text Area.

Posted on 2012-03-22
8
Medium Priority
?
1,583 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 83

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 83

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

636 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