+ Reply to Thread
Results 1 to 47 of 47

Macro with submit function included

  1. #1
    Forum Contributor
    Join Date
    07-28-2012
    Location
    madrid
    MS-Off Ver
    Excel 2010 at work excel 2016
    Posts
    1,050

    Macro with submit function included

    Hi in below code for web fill and check IBAN. I cant find out of include the submit button. I can fill out the field but not submit. Please have a look and try below code and see if you can help. P. s What ever i try it always give me a object error. Please have a look at the home page
    Use excel 2003

    Thanks in advance Sincerely Abjac


    Please Login or Register  to view this content.




    P.s Cross post but no answers in the other forum.

    http://www.mrexcel.com/forum/excel-q...-included.html

  2. #2
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    5,124

    Lightbulb Ola ! Try this :


    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    07-28-2012
    Location
    madrid
    MS-Off Ver
    Excel 2010 at work excel 2016
    Posts
    1,050

    Re: Macro with submit function included

    HI Marc. I am impressed not because the code is very long. But more because i tried search so much about this and can see other also have problems.
    Your code is working brilliant. Thanks allot- One question how do you find out of that the button for click is 11?
    Is there a way or macro to find out of this.

    Another thing is it possible to go through a range example from A1 to A10 and hold the result page lets say 4 seconds, and then close the page again. Then go and take A2 and repeat untill there is no more in column A to check?

    This vould be great, i can validate many by rolling the macro.

    If time please have a look if this is possible
    Thanks so much

    Sincerely

    Abjac
    Last edited by abjac; 07-12-2014 at 07:03 AM.

  4. #4
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    5,124

    Cool Re: Macro with submit function included


    In this particular case, 'cause submit button has no ID …

    Code to paste in a worksheet module :

    Please Login or Register  to view this content.
    Just compare with the inspector tool within your web browser …

    Salud !

  5. #5
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    5,124

    Re: Macro with submit function included

    Quote Originally Posted by abjac View Post
    Another thing is it possible to go through a range example from A1 to A10 and hold the result page lets say 4 seconds, and then close the page again. Then go and take A2 and repeat untill there is no more in column A to check?
    It's look possible but should be better just to put in column B a result like "ok" or "Incorrect !" ?

  6. #6
    Forum Contributor
    Join Date
    07-28-2012
    Location
    madrid
    MS-Off Ver
    Excel 2010 at work excel 2016
    Posts
    1,050

    Re: Macro with submit function included

    Thanks allot Marc. I am not sure how to use your macro. It dont find anything in this homepage, so why did you use the number 11Click 11?

    The other yes its it would be great if i can have in column B ok or incorrect. But i still need the page to be loaded areound 5 seconds, to take a screen shot of every validation.
    So if you have an idea how to set this up, it would really be great.

    Thanks in advance

    Sincerely

    Abjac
    Last edited by abjac; 07-12-2014 at 07:37 AM.

  7. #7
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    5,124

    Lightbulb Alternative way !


    Check the button with the inspector tool within your web browser
    then just compare with results of my CheckItems procedure !

    An alternative way is to just double click on a cell in column 1 to check an IBAN,
    code to paste directly in the worksheet module :

    Please Login or Register  to view this content.
    Last edited by Marc L; 07-12-2014 at 09:54 AM.

  8. #8
    Forum Contributor
    Join Date
    07-28-2012
    Location
    madrid
    MS-Off Ver
    Excel 2010 at work excel 2016
    Posts
    1,050

    Re: Macro with submit function included

    Thats really great is there a way you can change the code. So it check in a range from example A1:A10 one by one.

    so it open the validation, hold it 5 seconds and take the next one.

    Is this possible?.

    Thanks so far really great.

    Sincerely

    Abjac

  9. #9
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    5,124

    Cool Alternative way is the easy way !


    Update to prevent any button order change :

    Please Login or Register  to view this content.
    Quote Originally Posted by abjac View Post
    Is this possible ?
    A loop structure like For … Next is at a beginner level, you should try by yourself …
    Well explained in VBA inner help !

    Properties CurrentRegion, Columns, Rows, Count and Cells could be usefull too …
    Last edited by Marc L; 07-12-2014 at 10:49 AM.

  10. #10
    Forum Contributor
    Join Date
    07-28-2012
    Location
    madrid
    MS-Off Ver
    Excel 2010 at work excel 2016
    Posts
    1,050

    Re: Macro with submit function included

    Thanks Marc i understand and what you have done so far is a great help- I have one thing i have been strugled with. It is to close the explorer window. And i think i need that before i can make any loop. I have again read much about it and tried but get error what ever i try.
    Can you put that into your code. So it close the window after example 5 seconds?

    If you can do that i will try find out of make the loop through the cells.

    Please have a look.

    Sincerely

    Abjac

  11. #11
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    5,124

    Re: Macro with submit function included


    Use Wait method to pause the procedure

    and .Quit to close IE (you already had it in my CheckItems procedure !) …
    Last edited by Marc L; 07-12-2014 at 11:15 AM.

  12. #12
    Forum Contributor
    Join Date
    07-28-2012
    Location
    madrid
    MS-Off Ver
    Excel 2010 at work excel 2016
    Posts
    1,050

    Re: Macro with submit function included

    HI Marc i have tried that with no luck, it gives me an error. Could you try put it in the code please.

    Thanks

    Abjac

  13. #13
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    5,124

    Re: Macro with submit function included


    What did you try ?

    Where is your code ?

  14. #14
    Forum Contributor
    Join Date
    07-28-2012
    Location
    madrid
    MS-Off Ver
    Excel 2010 at work excel 2016
    Posts
    1,050

    Re: Macro with submit function included

    Hi on mobile now. I tried in the end to put. Ie.quit. But it gave me an object error. Sorry for the limited answer but out and send from mobile.
    Sincerely Abjac

  15. #15
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    5,124

    Arrow Re: Macro with submit function included

    Quote Originally Posted by Marc L View Post
    .Quit to close IE (you already had it in my CheckItems procedure !) …
    So just see my CheckItems procedure …

  16. #16
    Forum Contributor
    Join Date
    07-28-2012
    Location
    madrid
    MS-Off Ver
    Excel 2010 at work excel 2016
    Posts
    1,050

    Re: Macro with submit function included

    Hi Marc. Back home again. I tried and landed on this code. It open now and wait and open the window and continue until no more IBANS in the cells, column A. Only problem left is that it take everytime the cell i double click on and run the check up for this IBAN, and the next time it just check the the same IBAN.

    Here is the code so far. And i think maybe not so nice hehe but i try. The only thing left if to make it check one cell (IBAN)by a time instead of the same Iban.

    Please see if you can correct it.

    Here is my code now.

    Sincerely Abjac

    Please Login or Register  to view this content.

  17. #17
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    5,124

    Re: Macro with submit function included


    Just create a stand alone procedure, don't use this event !

  18. #18
    Forum Contributor
    Join Date
    07-28-2012
    Location
    madrid
    MS-Off Ver
    Excel 2010 at work excel 2016
    Posts
    1,050

    Re: Macro with submit function included

    Hi Marc. I tried with below code but it gives me and error have tried play around with it but still error. Please have a look at the code if time.

    Thanks in advance Abjac

    Please Login or Register  to view this content.

  19. #19
    Forum Contributor
    Join Date
    07-28-2012
    Location
    madrid
    MS-Off Ver
    Excel 2010 at work excel 2016
    Posts
    1,050

    Re: Macro with submit function included

    HI I finally landed at below code. I have not have succes making the loop, so i think i will make a new thread for this now.

    Thanks Marc for you help. So much written about this but really many also have problems with it. So its really great. Thanks allot.

    Will mark this as solved now.

    Sincerely

    Abjac

    The code without loop as i have it now

    Please Login or Register  to view this content.

  20. #20
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    5,124

    Cool Try this !


    Code to paste to worksheet module :

    Please Login or Register  to view this content.
    Enjoy and add my reputation !
    Last edited by Marc L; 07-18-2014 at 05:55 AM.

  21. #21
    Forum Contributor
    Join Date
    07-28-2012
    Location
    madrid
    MS-Off Ver
    Excel 2010 at work excel 2016
    Posts
    1,050

    Re: Macro with submit function included

    HI Marc and thanks. I tried your code pasted allot of IBAN in from cell A2 and down. It seems your code stop work after cell A5 with out I know why. Would be good if it could run down to last used cell in column A.

    You can try with these Ibans below and play with it-

    Thanks in advance.


    Sincerely

    Abjac

    Please Login or Register  to view this content.

  22. #22
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    5,124

    Re: Macro with submit function included


    When I post this kind of code, I always test it before !

    So again I just can tell you, as written and where it must be, it works like a charm on my side !
    Even with your data on computers with different Excel versions, no problemo !

    If you modify it, it's not my code anymore but yours !
    So you have to follow the code in step-by-step mode via F8 key and check variables, …

    If you fail, you always have my double click version !
    Last edited by Marc L; 07-18-2014 at 09:39 AM.

  23. #23
    Forum Contributor
    Join Date
    07-28-2012
    Location
    madrid
    MS-Off Ver
    Excel 2010 at work excel 2016
    Posts
    1,050

    Re: Macro with submit function included

    I think ur right Marc. At work it stopped maybe because of the internet not fast i dont know- Bu now what i came home and tried it works like a charm . So its really a great code. Could be funny if it in some way could give the result in columb B. valid or not valid. hehe maybe you can do that, dont know if its possible. But its a great code Marc and thanks allot for you help.

    Have a nice evening

    Bonjour

    Abjac

  24. #24
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    5,124

    Lightbulb Try this !


    Code to paste to worksheet module :

    Please Login or Register  to view this content.
    And please don't forget to add my reputation for each code !

    Buenas noches ‼
    Last edited by Marc L; 07-18-2014 at 11:41 AM.

  25. #25
    Forum Contributor
    Join Date
    07-28-2012
    Location
    madrid
    MS-Off Ver
    Excel 2010 at work excel 2016
    Posts
    1,050

    Re: Macro with submit function included

    Hi Marc. WOW i am really impressed about this one. I cleaned internet explorer before and maybe that make it more smoth. But i run through all with not problems. I cant give you more reputation more, dont allow me and also cant rank it again, done allow me.

    I will just say a big wow and a big thank you. Its so brilliant. A big WOW WOW for this one.

    Thanks allot Marc

    Have a nice evening
    Bonjour from here in Madrid

    Sincerely

    Abjac

  26. #26
    Forum Contributor
    Join Date
    07-28-2012
    Location
    madrid
    MS-Off Ver
    Excel 2010 at work excel 2016
    Posts
    1,050

    Re: Macro with submit function included

    Bonjour Marc. Just a little thing
    Its still a big wow I checked with 70 IBANS and sometimes it stop like its stock, i dont think its the code, its brilliant. But i found out if i refresh when it stop, it will start the same place. So if it was possible to make a refresh of the page if it wait more than lets say 1 min. This code is so good then. Could be funny and great if you could make that.Then it will always run all the way.
    Sincerly
    Abjac

  27. #27
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    5,124

    Question Re: Macro with submit function included


    I tried processor' speed reduced to 1.5Ghz but I failed to reproduce this issue !
    Each request requires between 1 and 4 seconds, a 2 seconds average …

    Issue came by using Refresh & Reload methods ! Maybe I missed something …

    So I try around but I doubt (as usual code to paste in worksheet module) :
    Please Login or Register  to view this content.
    Instead to pilot IE, faster way is using a XmlHtpp library but requires more Html & development skills …

    Regards !
    Last edited by Marc L; 07-19-2014 at 02:08 PM.

  28. #28
    Forum Contributor
    Join Date
    07-28-2012
    Location
    madrid
    MS-Off Ver
    Excel 2010 at work excel 2016
    Posts
    1,050

    Re: Macro with submit function included

    Bonjour Marc
    Thanks allot Marc ur code is working great, but it manage to block still. Its not ur code its brilliant. I found a way to avoid it. If i go tools, internet explorer. advanced and turn of show images. It runs perfect without any problem.
    If that could be done with a macro turn of images and when done turn on again. It would make it run totally smoth. Hehe another work around.
    But i dont know if this can be done with a macro.
    If time have a look but thanks for the great code so far really wow.

    Sincerely

    Abjac

  29. #29
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    5,124

    Re: Macro with submit function included


    I don't think so …

    Turn back on show image and turn on above it Use software rendering instead of GPU rendering and try …

  30. #30
    Forum Contributor
    Join Date
    07-28-2012
    Location
    madrid
    MS-Off Ver
    Excel 2010 at work excel 2016
    Posts
    1,050

    Re: Macro with submit function included

    HI Marc yes i guess its like that. Thanks allot for all your help it has been really impressing. So thanks allot.

    Sincerely

    Abjac

  31. #31
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    5,124

    Exclamation Re: Macro with submit function included


    It's not finished ‼

    Could you try and tell me :

    Quote Originally Posted by Marc L View Post
    Turn back on show image and turn on above it Use software rendering instead of GPU rendering and try …
    Last edited by Marc L; 07-20-2014 at 05:35 PM.

  32. #32
    Forum Contributor
    Join Date
    07-28-2012
    Location
    madrid
    MS-Off Ver
    Excel 2010 at work excel 2016
    Posts
    1,050

    Re: Macro with submit function included

    HI Ok i will for sure. FOr now it works like a charm with the images turned off. If i turn on, sometimes it still get stocked. But without it works really good. the Use software rendering instead of GPU rendering and try . I dont have in my home version of internet explorer. But i will try at work and see if that make any difference. I will for sure post here how it works.
    Sincerely
    Abjac

  33. #33
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    5,124

    Arrow Re: Macro with submit function included


    On my side, it's faster with this option active …
    It takes between 150 & 180 seconds to scan the IBAN set of your post #21.

    I try the other way - fastest - and only once I had a block
    but just when I hit ESC key to abort VBA the procedure freed …
    I never had such a issue but source is the server in my opinion.
    I try around but seems difficult to have hand in when hangs the server …

    Could you imagine the other way needs less than 7 seconds to do the same process ?!

  34. #34
    Forum Contributor
    Join Date
    07-28-2012
    Location
    madrid
    MS-Off Ver
    Excel 2010 at work excel 2016
    Posts
    1,050

    Re: Macro with submit function included

    I think your right Marc source is the server. I don't do it so fast as you for some reason. But it goes ok when I disable images. So for that its an ok way to do and don't take long time to change back,. You could try which I did. To copy the Ibans so you come up around 200. In this case I had the block, but only sometimes. But the solution to disable the images works fine, off course from a automatize perspective , it would be nice if this could be done by excel. But so important.
    I will keep you posted if some new things come up or some new experience about this.

    Thanks so much for your time, really great help.

    Sincerely

    Abjac

  35. #35
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    5,124

    Question Re: Macro with submit function included


    So forget IE way !

    Fastest way tests with a bunch of 200 IBANs : less than 40 seconds !

    Before to clean code, I let you choose between two displays :

    1) See progress result cell by cell

    2) Column B updates once at end of process, follow progress in status bar.

    Which one ?

  36. #36
    Forum Contributor
    Join Date
    07-28-2012
    Location
    madrid
    MS-Off Ver
    Excel 2010 at work excel 2016
    Posts
    1,050

    Re: Macro with submit function included

    Bonjour Marc.
    Wow if it can be done so fast it would really be great. If I can choose I would like to see progress result cell by cell. I am excited what you and how it can be done. But option 1 is perfect and if its so fast it will be so great.
    So excited to see how that can be done

    Thanks

    Sincerely
    Abjac

  37. #37
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    5,124

    Cool Faster way !


    So clear all previous codes and enjoy this one ! (as usual, paste it in the IBAN worksheet module)
    Please Login or Register  to view this content.
    "Control IBAN …" still appears in the status bar during process …

    No es una tontería si digo « Hoy la vida es chula para ti ! »

    __________________________________________________________________________________
    We are all very ignorant, what happens is that not all ignore the same things … (Albert Einstein)

  38. #38
    Forum Contributor
    Join Date
    07-28-2012
    Location
    madrid
    MS-Off Ver
    Excel 2010 at work excel 2016
    Posts
    1,050

    Re: Macro with submit function included

    Bonjour Marc

    Just checked this code. Again wowowowowow. Its really great so fast and roll without any problems. I am so impressed. Your the best, if you ever come Madrid let me know and I will buy a beer for you here hehe,.

    Its a fantastic code really.

    Thanks allot Marc. I really appreciate it. WOW'
    Have a nice evening

    Sincerely

    Abjac

  39. #39
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    5,124

    Talking Re: Macro with submit function included


    Glad it helps you !

    When you pilot IE, even if it is not visible, you have to wait at its opening,
    enter data, click a button to launch a request and thus wait again the page update …

    Using a XmlHttp library launches directly the request
    and it is far lighter than a web browser application !

    The IBAN calculator webpage is at beginner level, maybe a part at medium
    but easy to access if you know how to use a web browser (easy with inner inspector tool) …

    But some pages are much more difficult to read, sometimes I can't grab anything …

    A beer one day in Madrid, quizás !
    Last edited by Marc L; 07-21-2014 at 01:41 PM.

  40. #40
    Forum Contributor
    Join Date
    07-28-2012
    Location
    madrid
    MS-Off Ver
    Excel 2010 at work excel 2016
    Posts
    1,050

    Re: Macro with submit function included

    HI Marc i posted a new thread need a liittle change to this upper solution which was fantastic.

    Please if time have a look at below thread.

    http://www.excelforum.com/excel-prog...ed-change.html
    Thanks Abjac

    Thanks Marc its changed to the right link
    Last edited by abjac; 12-13-2014 at 03:55 AM.

  41. #41
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    5,124

    Question Re: Macro with submit function included

    Edit : wrong thread …

  42. #42
    Forum Contributor
    Join Date
    07-28-2012
    Location
    madrid
    MS-Off Ver
    Excel 2010 at work excel 2016
    Posts
    1,050

    Re: Macro with submit function included

    Hi. Marc. I added you as contact. Need a solution similar to upper one. And would be paid some for it. Please add me and i will send you a PM.
    Sincerely
    Abjac

  43. #43
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    5,124

    Re: Macro with submit function included


    Hi !

    Better is creating a new thread as anyone with web skills can help you …

  44. #44
    Forum Contributor
    Join Date
    07-28-2012
    Location
    madrid
    MS-Off Ver
    Excel 2010 at work excel 2016
    Posts
    1,050

    Re: Macro with submit function included

    HI Marc i have done that. If time please have a look. I know your brilliant in this matter with web pages.
    Thanks
    https://www.excelforum.com/excel-pro...ml#post4883707

  45. #45
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    5,124

    Re: Macro with submit function included


    So just wait for someone who can play with this social network, I can't as it is very confidential …

    See also on Web any tutorial to pilot IE in VBA.

  46. #46
    Forum Contributor
    Join Date
    07-28-2012
    Location
    madrid
    MS-Off Ver
    Excel 2010 at work excel 2016
    Posts
    1,050
    Quote Originally Posted by Marc L View Post

    So just wait for someone who can play with this social network, I can't as it is very confidential …

    See also on Web any tutorial to pilot IE in VBA.
    HI Marc. What if I make a other LinkedIn account. And pm you the password. Would you be willing to have a look and play with it? I know you are one of the best in this field. Sincerely Abjac send from mobile

  47. #47
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    5,124

    Arrow


    Some here on this subject are better than I am, as I can't play with any social network …

    Search on web tutorial for piloting IE browser and VBA samples, it's not very difficult.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. VBA function help. Concat cells based on parallel value. Function Included!
    By xsa in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 01-18-2013, 10:18 AM
  2. Replies: 1
    Last Post: 02-05-2012, 09:31 PM
  3. Can an IF function be included in a Code?
    By keithnrhonda in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-21-2010, 02:00 AM
  4. Create a Submit button save filename as A1, submit email unc path, etc.
    By briant97 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-30-2009, 09:52 AM
  5. [SOLVED] Having a cell with '<' sign included within a function?
    By Michelle in forum Excel General
    Replies: 2
    Last Post: 12-05-2005, 06:55 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1