Jump to content



Photo

(HELP) VBA Macro for Web form

macro vba macro vba macro ie

  • Please log in to reply
6 replies to this topic

#1 The World Is Yours

The World Is Yours

    Neowinian

  • Joined: 30-July 13

Posted 30 July 2013 - 12:08

Hello Neowin Forum,

I don't really understand much about the subject (in fact, I am brand new at this).
I am willing to create a project in my company about IE automation.

Every single day, we have to fill the same form, over and over again. This form is located on a website developed for the company, a customized system. It seems to be in Java (don't know very well).

I would like to create a VBA Macro in order to fill it automatically.

- Is it possible?
- Is there any kind of protection/security (by the fact of being a customized system) that might make it impossible?

So far I have this code:


Sub UseInternetExplorer()
Dim ieApp As New SHDocVw.InternetExplorer
ieApp.Visible = True
ieApp.Navigate "http://epmo.intranet.com.aspx"
Do While ieApp.Busy
Loop



End Sub




How do I find the hyperlink and perform a click on it?
What about dropboxes and textfields?


Thanks for the attention and patience! :)




#2 Haggis

Haggis

    Neowinian Senior

  • Tech Issues Solved: 12
  • Joined: 13-June 07
  • Location: Near Stirling, Scotland
  • OS: Debian 7
  • Phone: Samsung Galaxy S3 LTE (i9305)

Posted 30 July 2013 - 12:21

This is going to be quite complex and you already said you are brand new to this

 

This page describes the process have a look at it

 

http://www.ozgrid.co...ad.php?t=170186



#3 OP The World Is Yours

The World Is Yours

    Neowinian

  • Joined: 30-July 13

Posted 06 August 2013 - 18:41

Hello Haggis, thanks for the reply!

 

 

I am being able to fill some of the textboxes with the code below:

 

Sub AcessaPagina()

Dim ie As InternetExplorer
Set ie = New InternetExplorer

ie.Navigate "http://epmo.intranet...skCreation.aspx"

While ie.Busy
Wend

ie.Document.getElementById("Content_TEXT_ALPHA_COLUMN1").Value = "DAI COMPANY"
ie.Document.getElementById("Content_TEXT_ALPHA_COLUMN2").Value = "FEUMITO"
ie.Document.getElementById("Content_TEXT_ALPHA_COLUMN14").Value = "5B3"

ie.Visible = True

End Sub

However, sometimes I receive the message object doesn't support this property or method .
Do you happen to know why?

One last thing: in this same page, I have to select some Dropdown lists.  How can I do that?

 

Thanks a lot!



#4 Kalint

Kalint

    Neowinian Senior

  • Tech Issues Solved: 2
  • Joined: 16-January 07

Posted 06 August 2013 - 19:12

Hello Haggis, thanks for the reply!

 

 

I am being able to fill some of the textboxes with the code below:

 

Sub AcessaPagina()

Dim ie As InternetExplorer
Set ie = New InternetExplorer

ie.Navigate "http://epmo.intranet...skCreation.aspx"

While ie.Busy
Wend

ie.Document.getElementById("Content_TEXT_ALPHA_COLUMN1").Value = "DAI COMPANY"
ie.Document.getElementById("Content_TEXT_ALPHA_COLUMN2").Value = "FEUMITO"
ie.Document.getElementById("Content_TEXT_ALPHA_COLUMN14").Value = "5B3"

ie.Visible = True

End Sub

However, sometimes I receive the message object doesn't support this property or method .
Do you happen to know why?

One last thing: in this same page, I have to select some Dropdown lists.  How can I do that?

 

Thanks a lot!

Why dont you explain exactly what you're doing because I dont know what the hell is going on.  Yes you can do a dropdown list

 

This looks pretty good on automation:http://www.excely.co...ml#.UgFMVtK1GUY



#5 LaP

LaP

    Forget about it

  • Tech Issues Solved: 4
  • Joined: 10-July 06
  • Location: Quebec City, Canada
  • OS: Windows 8.1 Pro Update 1

Posted 06 August 2013 - 19:35

If you can use Firefox there's extensions avalaible to auto fill form.



#6 OP The World Is Yours

The World Is Yours

    Neowinian

  • Joined: 30-July 13

Posted 07 August 2013 - 14:08

If you can use Firefox there's extensions avalaible to auto fill form.

I can't  :(

It has to be on IE... 



#7 OP The World Is Yours

The World Is Yours

    Neowinian

  • Joined: 30-July 13

Posted 07 August 2013 - 14:11

Why dont you explain exactly what you're doing because I dont know what the hell is going on.  Yes you can do a dropdown list

 

This looks pretty good on automation:http://www.excely.co...ml#.UgFMVtK1GUY

I am trying to create this code to auto fill a form in website (intranet).
So far, I am being able to fill the textboxes, but sometimes I receive the message error : object doesn't support this property or method

 

Do you know why I keep receiving this message?

 

Also, there are some drop down lists that I have to select in the same page.

How can I do that?

Thanks!