+ Reply to Thread
Results 1 to 2 of 2

How to Execute Javascript in IE

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    11-29-2012
    Location
    Coimbatore, India
    MS-Off Ver
    Excel 2010
    Posts
    101

    How to Execute Javascript in IE

    Hi Everyone,

    I am trying to execute a Javascript in IE. here is my code.

    Sub Excel_E()
    
    Dim shellWins As ShellWindows
    Dim objIE As InternetExplorer
    
    Dim strScript As String
    
    Set shellWins = New ShellWindows
    
    If shellWins.Count > 0 Then
         'Get IE
        Set objIE = shellWins.Item(0)
    
    strScript = "$find('ReportViewerControl').exportReport('EXCEL');"
    
    objIE.document.parentWindow.execScript strScript, "JScript"
    
    
    
    End If
    
    End Sub
    I am getting Run-Time error '438': Object Doesn't support this property or method at this line

    objIE.document.parentWindow.execScript strScript, "JScript"
    Am I missing something here. Please help

  2. #2
    Forum Contributor
    Join Date
    11-29-2012
    Location
    Coimbatore, India
    MS-Off Ver
    Excel 2010
    Posts
    101

    Re: How to Execute Javascript in IE

    can someone please help. its quite urgent.

+ 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. [SOLVED] Change From Execute on Selections to Execute On All
    By EnigmaMatter in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-28-2014, 09:23 AM
  2. IF cell=error execute sub 1 if value execute sub 2... possible?
    By CDNcameron in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-31-2013, 05:28 PM
  3. Execute javascript code on a webpage with VBA
    By menyanthe in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-13-2009, 05:23 AM
  4. Javascript on VBA
    By rfeuchard in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-12-2008, 09:43 AM
  5. Execute javascript help
    By Ramthebuffs in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-26-2006, 10:28 PM

Tags for this Thread

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