Office 365 Excel - visual basic run time error '438'

Anonymous
2019-08-26T14:54:53+00:00

brought and installed MS Office 365 on home pc and trying to get Visual basic code to work

however, when running the below vba code i'm getting a runtime error '438' around the navigation to the website

Sub testie()

Dim ie As Object

Dim objCollection As Object

Dim i As Integer

Set ie = CreateObject("InternetExplorer.Application")

ie.Visible = True

ie.navigate = "http//www.google.co.uk"

End Sub

Clicking on debug highlights the ie.navigate line

The code appears to attempt to open the ie window but doesn't seem to like/understand the navigate command

Can you advise?

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
{count} votes
Answer accepted by question author
  1. Anonymous
    2019-08-26T18:17:29+00:00

    Hello,

    I am an independent advisor, and I am trying to help other users in Community with my experience in Microsoft products.

    When you are trying to use a method/property that does not belong to the object. For instance, if you have a Workbook object and try to access the Range property, it will give you the 438 error since the Range property belongs to the Sheets object.

    Try without http//.

    Do let me know if you require any further help on this. Will be glad to help you.

    Thank you

    2 people found this answer helpful.
    0 comments No comments
Answer accepted by question author
  1. Anonymous
    2019-08-26T15:05:49+00:00

    Niall_T,

    Try this:

    ie.Navigate "www.google.co.uk"

    without the equal sign and without http.

    Jan

    1 person found this answer helpful.
    0 comments No comments

3 additional answers

Sort by: Most helpful
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  2. Anonymous
    2019-08-26T18:02:49+00:00

    Many thanks Jan

    0 comments No comments
  3. Anonymous
    2019-08-27T13:15:33+00:00

    Many thanks AvinashThakur2

    0 comments No comments