+ Reply to Thread
Results 1 to 14 of 14

Open web address via button

  1. #1
    Registered User
    Join Date
    12-21-2011
    Location
    Aus
    MS-Off Ver
    Excel 2010
    Posts
    62

    Open web address via button

    Hi, I would like to open IE with a predefined web address detailed in cell A1. How can I create a button to do this?

    I have looked around but all codes seem to be to open a dedicated website. I want the cell A1 to be dynamic i.e. a VLOOKUP cell so the address can change dependant upon a drop down list.

    Specifically I want the button to open up an ip address in cell A1 (e.g. 192.168.112.78.. etc) and also I would like to add on to open port 8080. e.g. :8080 as this is to open a modem interface on the network.

    Finally the modem has a user name and password, is it possible to add this into the code somehow to automatically open the modem interface page. e.g. username in B1, password in C1

    cheers

  2. #2
    Valued Forum Contributor smuzoen's Avatar
    Join Date
    10-28-2011
    Location
    Brisbane, Australia
    MS-Off Ver
    Excel 2003/2007/2010
    Posts
    610

    Re: Open web address via button

    I don't know that you can do that due to loss of focus that will occur with the modem username and password dialogue box. IE has disabled the old http://admin:password@192.168.1.1 due to security reason and there is a registry hack for this but I am not going to post it as it is against our policy to circumvent security measures of any sort within this forum. If you have a web page that requires a username and password as part of the page rather than a dialogue box you could adapt the following code which is just an example of how to log into gmail automatically. So that fact that we are talking about security issues the rest of your question does become redundant. You can easily create drop down box that is a list of web addresses that contain username/password text entry fields - you just create a table with the web address, username and then password. The drop down list is then just the web address and do a simple vlookup to return the username and password - then you could use the following code to automatically log into the web page. As for pop up dialogues as some banks use for usernames and passwords it is against forum rules to give advice on a security workaround. To follow is how to log into your gmail account using code
    Please Login or Register  to view this content.
    That is as much help as I can give you as I am not going to break forum rules. If you want to know how to create drop down lists and do vlookups to return values then start another thread posting your requirements and upload a sample workbook showing how you want your workbook set up giving specific examples. Make sure there is no sensitive/private data in the workbook. As for security workarounds no one here is going to help you.
    Please read out Forum Rules
    11. Don't post questions regarding breaking or bypassing any security measure. Such posts will be deleted, and repeat offenders will be banned. This includes posting of links to sites that offer software, code or services to do this or posting of code to remove passwords.
    Hope this helps.
    Anthony
    Pack my box with five dozen liquor jugs
    PS: Remember to mark your questions as Solved once you are satisfied. Please rate the answer(s) by selecting the Star in the lower left next to the Triangle. It is appreciated?

  3. #3
    Registered User
    Join Date
    12-21-2011
    Location
    Aus
    MS-Off Ver
    Excel 2010
    Posts
    62

    Re: Open web address via button

    Hi, thanks for the info. The username and password implementation isnt that important to be honest, for security reasons it may be better to manually insert the username and password info anyhow.
    What I would like to do though is to be able to open the web address in cell A1 which will be filled via a VLOOKUP function in relation to a drop down box. A would like a button to be able to open the address in cell A1. Thanks

  4. #4
    Valued Forum Contributor smuzoen's Avatar
    Join Date
    10-28-2011
    Location
    Brisbane, Australia
    MS-Off Ver
    Excel 2003/2007/2010
    Posts
    610

    Re: Open web address via button

    Can you upload a sample workbook with no sensitive data showing how the data currently is presented and/or how you want it to appear - So in a sample sheet give a few examples of how you want the data to be appear showing the drop down box and what is to be returned. It makes it much easier to supply you an accurate answer if we can see how your workbook is to be constructed and if we can see an example of how the workbook is to appear after the macro/vlookups have returned/processed the data. Select Go Advanced, Manage Attachments and select the dummy workbook to upload. Make sure no sensitive/private data is in the workbook you upload. Do not upload screen dumps as no one wants to reconstruct a workbook based on an image.
    You will have a much better chance of getting an answer if you could supply a sample workbook.
    What do you want to lookup - a web address/a name of a website? Could you be a little more specific with a sample workbook - saying where you want the drop down box, what is to be returned from the lookup and then once that data is returned I assume you want a button to follow the url that is in A1 - a sample workbook showing how you want your data presented will enable me or someone else to give you a better answer

  5. #5
    Registered User
    Join Date
    12-21-2011
    Location
    Aus
    MS-Off Ver
    Excel 2010
    Posts
    62

    Re: Open web address via button

    please see attached
    Attached Files Attached Files

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

    Re: Open web address via button

    I haven't looked at your sheet as I can't open it here, but I would have thought that something like the following would suffice:

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    12-21-2011
    Location
    Aus
    MS-Off Ver
    Excel 2010
    Posts
    62

    Re: Open web address via button

    Nope, unfortunatley that didnt work. Any other suggestions? cheers

  8. #8
    Valued Forum Contributor smuzoen's Avatar
    Join Date
    10-28-2011
    Location
    Brisbane, Australia
    MS-Off Ver
    Excel 2003/2007/2010
    Posts
    610

    Re: Open web address via button

    Attach the following code to a button
    Please Login or Register  to view this content.
    Last edited by smuzoen; 03-12-2012 at 07:36 PM.

  9. #9
    Registered User
    Join Date
    12-21-2011
    Location
    Aus
    MS-Off Ver
    Excel 2010
    Posts
    62

    Re: Open web address via button

    This now open up IE but it does not put the ip address and port into the address. At the moment I just get an empty IE. cheers

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

    Re: Open web address via button

    What doesn't work? Do you get an error message? Does the browser open with no error message? Is the lookup in sheet1?

  11. #11
    Valued Forum Contributor smuzoen's Avatar
    Join Date
    10-28-2011
    Location
    Brisbane, Australia
    MS-Off Ver
    Excel 2003/2007/2010
    Posts
    610

    Re: Open web address via button

    I have attached the workbook with the code - I changed the first IP address as this is my router IP local address for testing - it works fine for me? Try the attachment - it will open IE and place the local address into the IE address bar with the port number specified - report back if you have problems
    Attached Files Attached Files

  12. #12
    Registered User
    Join Date
    12-21-2011
    Location
    Aus
    MS-Off Ver
    Excel 2010
    Posts
    62

    Re: Open web address via button

    Code.jpgRTE5.jpgI get the errors attached, IE opens ok but the address field is empty. cheers

  13. #13
    Registered User
    Join Date
    12-21-2011
    Location
    Aus
    MS-Off Ver
    Excel 2010
    Posts
    62

    Re: Open web address via button

    any thoughts???

  14. #14
    Valued Forum Contributor
    Join Date
    05-21-2009
    Location
    Great Britain
    MS-Off Ver
    Excel 2003
    Posts
    550

    Re: Open web address via button

    What is displayed by the MsgBox if you run the following code?

    Please Login or Register  to view this content.
    Please put error messages (quoting exactly) and indicate the faulting statement in your post rather than as images because that makes it easier to help.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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