+ Reply to Thread
Results 1 to 3 of 3

VBA not working when published on website

  1. #1
    Registered User
    Join Date
    12-14-2012
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    3

    Unhappy VBA not working when published on website

    Please Help !!!
    I have a powerpoint presentation that has a command button on it with a vba macro. I plan to publish this file on LMS so that clients can use it as a learning activity. When they get to the last page they will be instructed to click on the command button and that in turn will take them to a specific website where the can continue their training. The macro searches for the currently active Internet Explorer window that has the word "SUMTOTAL" in its title and then opens into that IE window the specified webpage. In my example I am calling the webpage "www.google.ca"

    My problem is, when I publish this using the Powerpoint addon Articulate the button becomes inactive and will not execute the macro in the webpage window. Can anyone tell me how to get around this problem? Can VBA macros run on the internet or are they incompatible with HTML code ? How can I publish this on the internet in Show Mode so that the command button and code will work ? Thank you.

    My code looks like this:

    Private Sub CommandButton2_Click()

    'loop through each window
    For Each wd In CreateObject("Shell.Application").Windows

    If wd = "Windows Internet Explorer" Then
    If InStr(UCase(wd.Document.Title), "SUMTOTAL") <> 0 Then
    wd.Navigate "rivate Sub CommandButton2_Click()

    'loop through each window
    For Each wd In CreateObject("Shell.Application").Windows

    If wd = "Windows Internet Explorer" Then
    If InStr(UCase(wd.Document.Title), "SUMTOTAL") <> 0 Then
    wd.Navigate "http://www.google.ca"
    Exit For
    End If
    End If
    Next wd
    End Sub
    Last edited by yogidishman; 01-09-2014 at 12:33 PM.

  2. #2
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: VBA not working when published on website

    I very much doubt you can. VBA will not work on the internet, even if it could, you wouldn't be able to control the user's browser

  3. #3
    Registered User
    Join Date
    12-14-2012
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: VBA not working when published on website

    Thanks for your reply.

    Yea, that's kinda where I was ending up. I can get it to work with a hyperlink but the problem there is that hyperlinks by default want to open in new website windows. Do you know if there's anyway to specify in a hyperlink statement that you want it to use the current webpage window?

+ 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. Done my xlsx Dashboards, now want them as a working website
    By IrishChristof in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-07-2011, 08:54 AM
  2. Web Query Not Working for this website
    By robgrant in forum Excel General
    Replies: 0
    Last Post: 06-08-2010, 03:12 PM
  3. SendKey {enter} on Website not working
    By bconner in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-20-2009, 11:38 AM
  4. excel 2007 worksheet published as a website
    By astar24 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-20-2009, 09:18 AM
  5. [SOLVED] Excel link to website not working
    By jgadbois in forum Excel General
    Replies: 4
    Last Post: 05-27-2005, 03:05 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