Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Need to fill up a Text Area.

Posted on 2012-03-22
8
Medium Priority
?
1,598 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
7 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
Technology Partners: 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!

 
LVL 84

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 84

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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

How to get Spreadsheet Compare 2016 working with the 64 bit version of Office 2016
If you need to forecast numbers -- typically for finance -- the Windows and Mac versions of Excel 2016 have a basket of tools to get the job done.
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

810 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