VBA code to open URL

mckaya100

New Member
Joined
May 4, 2011
Messages
3
Hi,

I need VBA code that will open a URL site when someone opens the Workbook.
I want to be able to track who uses the work book.

e.g.

When the user opens the workbook, It triggers the url site.
The site will then record user details (unknown to the user)

I will be using this information to analyse the way my reports are being used.

I have found code for button commands but this is not the same.

Has anyone been able to do this or something similar?

Thanks,

Adam
 
I find the most simple is
VBA Code:
    shell "explorer.exe URL"

But then as far as I'm aware you can't really do much with it, like sending a logonid and password, navigating to a specific page, taking content from the page, etc.
 
Upvote 0

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
I was able to get a basic counter working using another example from your forum:
:
.Navigate "http://myurl.com/cgi-bin/excelcounter/excel.pl"
:
However it would be great to pass more variables back to the PERL Script.
/QUOTE]

I don't speak PERL but can you not inject values into the variables in the script as follows:-

VBA Code:
     .Navigate "http://myurl.com/cgi-bin/excelcounter/excel.pl[COLOR=rgb(184, 49, 47)][B]?[/B][/COLOR][B][COLOR=rgb(41, 105, 176)]name=fred[/COLOR][COLOR=rgb(184, 49, 47)]&[/COLOR][/B][COLOR=rgb(41, 105, 176)][B]age=21[/B][/COLOR]"
 
Upvote 0

Forum statistics

Threads
1,224,521
Messages
6,179,278
Members
452,902
Latest member
Knuddeluff

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