Macro to open a website from a list in excel ask me if its what i'm looking for then add yes or no next to the web address in excel?

tonywatsonhelp

Well-known Member
Joined
Feb 24, 2014
Messages
3,194
Office Version
  1. 365
  2. 2019
  3. 2016
Platform
  1. Windows
Hi everyone,
OK I've got a big challenge for you all now,
I have a list of websites in column A of a spreadsheet, the number of website will vary as I have lot of sheets to go through, however what I want to do is open each site to see if its the type of website I'm looking for and put a yes or no next to each site.
so I'm looking for a macro that can start at A2 open up the web address in A2, then ask me "is this what you are looking for? I answer yes or no and the answer gets put into the excel document in column B next to the website (B2), we then move on to cell A3 and do the same thing and carry on until I've done all web sites in my list.
Does anyone know if this would be possible? if so,
how I could do it?
I'm on office 2013 and in have internet explorer and chrome loaded if that helps.

I know this might be to big a question for someone to answer on here but I was hopping maybe somebody would know how to do it?
here is a snippet of the websites if you need to test anything:
I could really do with help on this?

Thanks

Tony
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
I can't write VBA code off the top of my head like some others here can, but I think you can break it down into these steps and then find the individual bits of code for each, then put them together into a single sub:

1. Resize the main excel window to the same size as the "Yes/No" popup button prompt (this may require a little experimentation and adjustment)
2. Open website 1
3. Make Excel the active application and produce the yes/no button
4. Add the value depending on the decision to column B
4a. (optional) close the IE tabbed just opened (or maybe only if the user clicked "no")
5. Repeat from step 2 until end of list
5a. (optional) close all the tabs in IE opened by the process (or just those the user clicked "no" to)
6. Resize the excel window to maximum again.

4a and 5a are optional depending on how you want the PC to be left after the macro has finished, only one or the other is needed.

All of those 6 steps are things you can find in a search on this forum or google. Sorry I can't be more helpful by supplying specific code but if you put something together and it's not working you can always come back and post it and I can help find errors (I'm better at reading code than writing it)
 
Upvote 0
Hi Steph77,
I appreciate your help,
I will attempt to follow your guidance and see what I can find but if anyone can give me more help I would be very grateful as I doubt my skills will be enough to do this myself? I always end up running around for hours chasing my tail.
all help will be very much appreciated.
Thanks
Tony
 
Upvote 0
Thy This:
In your sheet put a web address in any cell
Then double click the cell after doing this:
Right Click on your sheet tab
Choose View code
Paste the below code:
Code:
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
Dim answer
answer = MsgBox("Is This a Good Site?", vbYesNo + vbQuestion, "Empty Sheet")
If answer = vbYes Then
ActiveCell.Offset(0, 1) = "Good site"
ActiveCell.Offset(0, 1).Select
answer = ""
End If
 
Upvote 0
Hi My Answer is this,
your code works great for putting the answers in,
thank you,
I wish there was a way I could get it to do the opening and closing of the websites as well?
 
Upvote 0
tonywatson:

My script should have opened the web site. How would the script know when you want to close it?
 
Upvote 0
Hi My Answer is this,
your script opens the website yes, its great and might be as good as I can hope for, but what I was hoping to get was a script that would open the website ask me if its what I wanted, then when I answer yes or no close the website and go to the next one in the column and open that one.
the reason being is I've got 1,000s of these sites to open, most wont be what I want, so if I can save a little time have the website open and close automatically it will save me a lot of time in the long run.
your code will help me enormously, but if I could get it fine tuned to just do everything and all I need do is click yes or no it would be perfect.
if you or anyone knows a way to do this I would be so grateful.
 
Upvote 0
Tony. Ok I understand now. I will see what I can do. This first attempt was to see if this is part of what you want. I will work on this and get back with you in a day or two.
 
Upvote 0

Forum statistics

Threads
1,213,557
Messages
6,114,287
Members
448,562
Latest member
Flashbond

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top