Solved

How do I access a website that exists in favourites

Posted on 2004-09-08
4
161 Views
Last Modified: 2010-05-02
I want to access a website that exists in favourites? I'm automating a task that will execute a website that exists in favourites.  Will someone please help me with this?
0
Comment
Question by:willwatters
  • 2
  • 2
4 Comments
 
LVL 10

Expert Comment

by:anv
ID: 12004536
hi willwatters

u can get help from here..

http://www.freevbcode.com/ShowCode.Asp?ID=495

the code is to add a site to favorites..

u can manipulate it to get the site from favorites..


good luck
0
 

Author Comment

by:willwatters
ID: 12004831
Do you know how i can do it using WshSpecialFolders object.

I have started the following code:

Dim oShell, oSpFolders

Set oShell = WScript.CreateObject("WScript.Shell")
Set oSpFolders = oShell.SpecialFolders

0
 
LVL 10

Accepted Solution

by:
anv earned 50 total points
ID: 12004902
0
 

Author Comment

by:willwatters
ID: 12005372
I tried the following code to access a web site in favourites, but it doesn't work. Will you please fix it for me.

Dim oShell, oSpFolders, i, strExamen
   
    strExamen = "Examen - Home Page"
   
    Set oShell = WScript.CreateObject("WScript.Shell")
    Set oSpFolders = oShell.SpecialFolders("Favourites")
   
    For i = 0 To oSpFolders.Count
        If oSpFolders.Item(i) = strExamen
            oIE.Navigate2 "http://WWW.examen.com"
            While oIE.Busy
                'wait for the page to load
            Wend
            GoTo GotExamenHP
        End If
    Next i

    MsgBox ("Error opening Examen Home Page : " & Err.Description)

GotExamenHP:
0

Featured Post

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

831 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