Anyone know how I can resolve the error message I am getting.....or have similar code that I could try.
Hello, I am trying to accomplish the following, in case anyone knows how to do it. I need to (1) take the contents of the active cell, (2) open my yahoo mail in internet explorer(http://us.mc576.mail.yahoo.com/mc/ welcome?.rand=d64n921nnhrdu). And then (3) to place the active cell contents in the "search mail" search box, and then (3) press enter to display the results. ------------------------------------------------------------------------ FYI, i recieved the below response from Ashish Jain, but I haven' had any luck thus far. Hi Mike Here is your solution: Sub Login_Yahoo() 'Requires Reference to "Microsoft Internet Controls" 'Requires Reference to "Microsoft HTML Library" 'Declare Reference to InternetExplorer Object Dim MyBrowser As SHDocVw.InternetExplorer 'Set Reference to InternetExplorer Object Set MyBrowser = New SHDocVw.InternetExplorer With MyBrowser 'Make the Browser visible .Visible = True ' Open Yahoo Mail .Navigate "http://mail.yahoo.com" ' Insert Text in Search Box and Click on Search Button. .document.all.searchTheMailFrmtop.msqtop.value = Activecell.value .document.all.searchTheMailFrmtop.mailsearch.Click End With End Sub -------------------------------------------- (my response to Ashish.......) Thanks again Ashish. You have been very kind. This time, however, when I run the macro, My yahoo mail opens, but no search is performed. In excel, I get the following error: "Run-time error '-2147467259 (80004005)': Automation error Unspecified error" I tried playing around with it, but have had no luck. Any ideas what might be wrong? I provided the HTML below, in case it helps. <div id="searchtestfieldstop" class="searchforms"> <form id="searchTheMailFrmtop" name="searchTheMailFrmtop" action="/y5/s/search;_ylt=ArD8uqVNMO9zi.gQwuZONpxpk70X?extraargs= %26.rand%3D726416326%26da%3D0" method="post" target="_top"> <p> <label for="msqtop" class="offscreen"> Search Mail </label> <input class="inputsearchtext" type="text" size="18" maxlength=50 name="s" id="msqtop" value="" /> <input class="inputbutton" type="submit" id="mailsearch" name="MailSearch" value="Search Mail" title="Search Mail" /> </p> </form> --~--~---------~--~----~------------~-------~--~----~ ------------------------------------------------------------------------------------- Some important links for excel users: 1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at http://www.excelitems.com 2. Excel tutorials at http://www.excel-macros.blogspot.com 3. Learn VBA Macros at http://www.vbamacros.blogspot.com 4. Excel Tips and Tricks at http://exceldailytip.blogspot.com To post to this group, send email to [email protected] If you find any spam message in the group, please send an email to: Ayush Jain @ [email protected] or Ashish Jain @ [email protected] ------------------------------------------------------------------------------------- -~----------~----~----~----~------~----~------~--~---
