Jump to content
Sign in to follow this  
mki

The Ultimate Excel Prospecting Macro

Recommended Posts

The Setup:

prospecting-macro.gif.79a91c5f8fd35efe5d5233d6258e94ca.gif

Column 1 in your spreadsheet is your status, so whatever "good" "bad" whatever you want. Relevant or irrelevant, 3 stars, 17 bananas, it doesn't matter, whatever you are looking for. That's what you are filling during this prospecting process. Note: I personally just close the tab if it's bad and when I get to the end of the sheet I replace the blanks with "ignore" with a macro.

Column 2 is empty and when you select it, it will open the URL in Mozilla Firefox (assuming the path is correct in the code below.)

Column 3 is the URL or domain.

How to use it: Use the keyboard keys, you can hold the down arrow in column 2 to open up how every many URLs / domains you want. Then just go through the tabs.

Note: Some websites steal the focus with JS, just click the TitleBar of Excel, so you don't lose position. I actually disable JS while doing with a plugin called "Disable JS" https://addons.mozilla.org/en-US/firefox/addon/disable-javascript/

The plugin is really useful on other websites that do annoying JS things. :)

Tip: Alt+Tab back and forth and Ctrl+W will close the currently open tab in Firefox. I have an MS office keyword and setup the 1 and 2 buttons to do that. Edit: I tried it for an hour and switched to https://addons.mozilla.org/en-US/firefox/addon/shortkeys/ and mapped alt+` to close tab. It's physically easier on your hand, but that plugin will not work on certain tabs, which in this case is actually good, since I want to keep a blank tab open so that I don't have to keep spawning firefox.exe and to do that I always keep the first tab blank (my computer is pretty fast but closing and executing firefox does waste time.)

Option Explicit
Private Sub Worksheet_SelectionChange(ByVal Target As Range)

Dim URL As String
Dim Command As String
Dim Result

On Error GoTo ErrorEvent

If Target.Cells.Count > 1 Then
    Exit Sub
End If

Application.EnableEvents = False

If Target.Column <> 2 Then
    Application.EnableEvents = True
    Exit Sub
End If

URL = Target.Offset(0, 1).Value

Command = "C:\Program Files\Mozilla Firefox\firefox.exe -new-tab -private-window " & URL

Result = Shell(Command, 4)

AppActivate Application.Caption

ExitNormally:

    Application.EnableEvents = True
    Exit Sub
ErrorEvent:
    MsgBox Err.Description
    Resume ExitNormally
End Sub

Share this post


Link to post
Share on other sites

SEOPress WordPress SEO plugin

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.