Tuesday, November 22, 2011

Excel Macros, VB Script and HTTP Basic Authentication

I came across an Excel sheet that retrieve data from a web site by calling a URL using a macro (VB Script). The site was using basic authentication and the macro wasn't working since it was not sending the user credentials in the request header. I haven't worked with Excel Macros or VB Script so turned to Google for some help.

Didn't find anything that was working but found some half answers which I managed to cobble together to get a working solution. Thought I would write it down here for anyone trying to do the same in future.



Base64Encoding function copied from here and

Don' forget to click the +1 button below if this post was helpful.

88 comments:

peterson said...

Your information about VB scripts is really interesting and innovative. Also I want you to share latest updates about this VB. Can you update it in your website? Thanks for sharing
Dot net training institute in Chennai

surangacloud said...

Your posts is really helpful for me.Thanks for your wonderful post. I am very happy to read your post.
Mysql Training in chennai | Mysql Training chennai

Unknown said...
This comment has been removed by the author.
Unknown said...

Thanks for sharing informative article… Know about How to Change BSNL WiFi Password from techfizy.

Lucky said...

Thank you so much for sharing... game killer ios no jailbreak

Unknown said...

I think you have a long story to share and i am glad after long time finally you cam and shared your experience.python training in chennai | python training in bangalore

python online training | python training in pune

python training in chennai

Unknown said...

I have picked cheery a lot of useful clothes outdated of this amazing blog. I’d love to return greater than and over again. Thanks! 

Data Science Training in Chennai
Data science training in bangalore
Data science online training
Data science training in pune
Data science training in kalyan nagar
selenium training in chennai

Mounika said...

Thanks for the good words! Really appreciated. Great post. I’ve been commenting a lot on a few blogs recently, but I hadn’t thought about my approach until you brought it up. 
python training in velachery
python training institute in chennai

Unknown said...

Whoa! I’m enjoying the template/theme of this website. It’s simple, yet effective. A lot of times it’s very hard to get that “perfect balance” between superb usability and visual appeal. I must say you’ve done a very good job with this.

AWS Online Training | Online AWS Certification Course - Gangboard

Best Selenium Training in Chennai | Selenium Training Institute in Chennai | Besant Technologies

Selenium Training in Bangalore | Best Selenium Training in Bangalore

AWS Training in Bangalore | Amazon Web Services Training in Bangalore

Amazon Web Services Training in Pune | Best AWS Training in Pune

Sakthi Murugan said...

Keep up the great work, I read few blog posts on this site and I believe that your website is really interesting and has loads of good info.
Selenium Training in Chennai
Loadrunner Training in Chennai
PHP Training in Chennai
cloud computing training in chennai
Salesforce Training in Chennai
DOT NET Training in Chennai

Prityyou said...
This comment has been removed by the author.
Prityyou said...

Outstanding blog thanks for sharing such wonderful blog with us ,after long time came across such knowlegeble blog. keep sharing such informative blog with us.
Airport Ground Staff Training Courses in Chennai | Airport Ground Staff Training in Chennai | Ground Staff Training in Chennai

Aruna Ram said...

This post very impress to me. I learned a lot from your blog. I waiting for your updates.
Machine Learning Training in Aminjikarai
Machine Learning Course in Vadapalani
Machine Learning Course in Chennai
Machine Learning Classes near me
Machine Learning Training in Tnagar

mercyroy said...

Innovative thinking of you in this blog makes me very useful to learn.
i need more info to learn so kindly update it.
AWS training courses near me
AWS Training in Chennai Anna Nagar
AWS Training

gowthunan said...

Do you mind if I quote a couple of your posts as long as I provide credit and sources back to your blog?
nebosh course in chennai

Aruna ram said...

Really useful information about this,very helful for me. Keep it up.
Data Science Training in Bangalore
Data Science Certification in Bangalore
Data Science Training in Annanagar
Data Science Training in Chennai
Data Science Training in Aminjikarai
Data Science Training in Vadapalani

Anonymous said...

I really want to thank you for sharing this with us. I expect more post like this.

Advanced Excel Training in Chennai
Excel Course in Chennai
Excel Macro Training in Chennai
Excel Academy Chennai
Excel Training Institute in Chennai
Excel Course in Velachery

mercyroy said...

I really thank you for your innovative post.I have never read a creative ideas like your posts.here after i will follow your posts which is very much help for my career.
Android Courses in OMR
Android Training in Guindy
Android Training in Nolambur
android training institutes in bangalore

aruna ram said...

I am very glad to read your blog. It's very interesting post and very quickly understand to me. Thank you for your post.
RPA Courses in Bangalore
Robotics Classes in Bangalore
Robotics Courses in Bangalore
Automation Courses in Bangalore
RPA Training in Bangalore
Robotics Training in Bangalore

sathyaramesh said...

Great post!
Thanks for sharing this list!
It helps me a lot finding a relevant blog in my niche!
RPA Training
RPA Training Institute in Chennai
Robotic Process Automation Courses
learn Robotic Process Automation
RPA Training Course

VenuBharath2010@gmail.com said...


Awesome Post. It shows your in-depth knowledge on the content. Thanks for Sharing.
Informatica Training in Chennai
Informatica Training center Chennai
Informatica Training Institute in Chennai
Best Informatica Training in Chennai
Informatica Course in Chennai
IELTS coaching in Chennai
IELTS Training in Chennai
IELTS coaching centre in Chennai

Sadhana Rathore said...

Excellent and useful blog admin, thanks for taking time to share this page admin. Really helpful.
ccna Training in Chennai
ccna course in Chennai
RPA Training in Chennai
Robotics Process Automation Training in Chennai
Angularjs Training in Chennai
Angularjs course in Chennai

DeepikaOrange said...

I very much enjoyed this article. Nice article thanks for given this information. I hope it useful to many People

LoadRunner Training in Chennai
LoadRunner Training
Performance Testing Training in Chennai
Performance Testing Training

LindaJasmine said...


Great Article. The way you express in extra-ordinary. The information provided is very useful. Thanks for Sharing. Waiting for your next post.
SAS Training in Chennai
SAS Course in Chennai
SAS Training Institutes in Chennai
SAS Institute in Chennai
Clinical SAS Training in Chennai
SAS Analytics Training in Chennai
Photoshop Classes in Chennai
Photoshop Course in Chennai
Photoshop Training in Chennai

sathyaramesh said...

Thanks for sharing your article with us. It’s really useful and informative to me and I hope it helps the people who are in need of this essential information.
Testing Training in Chennai | Software testing institutes in chennai
software testing training center in coimbatore | software testing training institutes in coimbatore
software testing training institutes in bangalore | best software testing institute in bangalore
software testing training institute in madurai | best software training institutes in madurai

jefrin said...

Very useful for reading this blog keep posting
https://www.slajobs.com/advanced-excel-vba-training-in-chennai/

jefrin said...

Great post thanks for sharing
php training institute chennai

jefrin said...

Wow nice to read the post

best salesforce training institute chennai

tamilsasi said...

Great Article… I love to read your articles because your writing style is too good, its is very very helpful for all of us and I never get bored while reading your article because, they are becomes a more and more interesting from the starting lines until the end.
devops online training

aws online training

data science with python online training

data science online training

rpa online training

sai ram said...

This blog is the general information for the feature. You got a good work for these blog.We have a developing our creative content of this mind.Thank you for this blog. This for very interesting and useful.
Microsoft Azure online training
Selenium online training
Java online training
uipath online training
Python online training

Vicky Ram said...

Nice post. I learned some new information. Thanks for sharing.

Technology
englishlabs

Priyanka said...

Attend The Python Training in Bangalore From ExcelR. Practical Python Training in Bangalore Sessions With Assured Placement Support From Experienced Faculty. ExcelR Offers The Python Training in Bangalore.

jvimala said...

Thanks for the amazing work. Really useful.

Regards,

Android App Development Training in Chennai |Data Science Training In Chennai | Python Training and Placement in Chennai

jvimala said...

Amazing article. Your blog helped me to improve myself in many ways thanks for sharing this kind of wonderful informative blogs in live.
javascript training in chennai | javascript training institute in chennai | javascript course in chennai | javascript certification in chennai | best javascript training in chennai

jaanu said...

Easily, the article is actually the best topic on this registry related issue. I fit in with your conclusions and will eagerly look forward to your next updates.
big data course

gautham said...

many of the bloggers and developers think for the security of the system and for the data security. it is better to learn on hacking through ethical hacking online training

Prwatech said...

I learned World's Trending Technology from certified experts for free of cost. I Got a job in decent Top MNC Company with handsome 14 LPA salary, I

have learned the World's Trending Technology from python training in btm experts who know advanced concepts which can help to solve any type of Real-time issues in the field of Python. Really worth trying

kavitha said...

Nice Post...

iot internships
inplant training in chennai
internship for automobile engineering students
internship for mca students in chennai
internship for eee students
internship for aeronautical engineering students
inplant training report for civil engineering
internship for ece students in chennai with stipend
summer training for ece students after second year
python internship

kavitha said...

Good.
how to hack flipkart
tp link wifi password hack
power bi developer resume
android secret codes and hacks pdf
slideshow html code for website
javascript max integer
tell me about yourself
given signs signify something and on that basis
kumaran systems interview pattern
bangalore traffic essay

saishree said...

great.
Acceptance is to offer what a lighted
A reduction of 20 in the price of salt
Power bi resumes
Qdxm:sfyn::uioz:?
If 10^0.3010 = 2, then find the value of log0.125 (125) ?
A dishonest dealer professes to sell his goods at cost price but still gets 20% profit by using a false weight. what weight does he substitute for a kilogram?
Oops concepts in c# pdf
Resume for bca freshers
Attempt by security transparent method 'webmatrix.webdata.preapplicationstartcode.start()' to access security critical method 'system.web.webpages.razor.webpagerazorhost.addglobalimport(system.string)' failed.
Node js foreach loop

Softgen Infotech said...

Wonderful thanks for sharing an amazing idea. keep it...

Looking for Software Training in Bangalore , learn from Softgen Infotech Software Courses on online training and classroom training. Join today!

raju said...

niceeee....
brunei darussalam hosting
inplant training in chennai

raju said...

nice...
dominican republic web hosting
iran hosting
palestinian territory web hosting
panama web hosting
syria hosting
services hosting
afghanistan shared web hosting
andorra web hosting
belarus web hosting

preethi minion said...

good..
inplant training in chennai
inplant training in chennai
inplant training in chennai for it.php
italy web hosting

Realtime Experts said...

It is amazing and wonderful to visit your site.Thanks for sharing this information,this is useful .Oracle training in Bangalore

Realtime Experts said...

Great post!I am actually getting ready to across this information,i am very happy to this commands.Also great blog here with all of the valuable information you have.Well done,its a great knowledge.Software Testing Training in Bangalore

Realtime Experts said...


Thanks for one marvelous posting! I enjoyed reading it; you are a great author. I will make sure to bookmark your blog and may come back someday. I want to encourage that you continue your great posts. sap training in bangalore

Realtime Experts said...

Great post!I am actually getting ready to across this information,i am very happy to this commands.Also great blog here with all of the valuable information you have.Well done,its a great knowledgez. ORACLE APPS training in bangalore


hari said...

very good
inplant training in chennai
inplant training in chennai
inplant training in chennai for it.php
Bermuda web hosting
Botswana hosting
armenia web hosting
dominican republic web hosting
iran hosting
palestinian territory web hosting
iceland web hosting

Shalini Kumar said...
This comment has been removed by the author.
hari said...

very nice
inplant training in chennai
inplant training in chennai for it
suden web hosting
tunisia hosting
uruguay web hosting
Bermuda web hosting
Botswana hosting
armenia web hosting
lebanon web hosting

hari said...

good
Bermuda web hosting
Botswana hosting
armenia web hosting
lithuania shared web hosting
inplant training in chennai
inplant training in chennai for it
suden web hosting
tunisia hosting
uruguay web hosting

ammu said...

excellent blogs.....!!!
chile web hosting
colombia web hosting
croatia web hosting
cyprus web hosting
bahrain web hosting
india web hosting
iran web hosting
kazakhstan web hosting
korea web hosting
moldova web hosting

Jenifer said...

Great learning experience with proficient trainers in Informatica. Flexible timings with hands on experience with real time scenarios.

microsoft training in bangalore

microsoft training institutes in bangalore

microsoft course content

microsoft training centres in bangalore

microsoft course syllabus

microsoft training

Jenifer said...

I wanted to build my career in IT. Hats-off to the trainers at the training centre. They provide complete assistance and always ready to guide.

microsoft training and placement support in bangalore

microsoft training free demo class

microsoft placement bangalore

microsoft online training

microsoft classroom training

microsoft training with lab facilities

microsoft training with certified and experienced trainers


Unknown said...

I needed to thank you for this good read!! I certainly enjoyed every bit of it. I've got you book-marked to check out new stuff you post…
Gadgets

High Technologies Solutions said...
This comment has been removed by the author.
High Technologies Solutions said...

High Technologies Solutions Provide Advanced Excel, MIS, VBA, SQL, C, C++, JAVA Training with 100% Placement assistance. Further More Info here-+91-9311002620.

Advanced Excel Training Institute in Delhi
Advanced Excel Training Institute in Noida

lionelmessi said...

Hi, Thanks for sharing nice information about that...


DevOps Training In Hyderabad

Jayalakshmi said...




The strategy you have posted on this technology helped me to get into the next level and had lot of information in it. The angular js programming language is very popular which are most widely used.




Dot Net Training in Chennai | Dot Net Training in anna nagar | Dot Net Training in omr | Dot Net Training in porur | Dot Net Training in tambaram | Dot Net Training in velachery










tech soft said...

nice post

Sowmiya R said...

Your info is really amazing with impressive content..Excellent blog with informative concept.
Oracle Training | Online Course | Certification in chennai | Oracle Training | Online Course | Certification in bangalore | Oracle Training | Online Course | Certification in hyderabad | Oracle Training | Online Course | Certification in pune | Oracle Training | Online Course | Certification in coimbatore

AI Training in Hyderabad said...

Really useful information. Thank you so much for sharing.It will help everyone.Keep Post.

AWS Training in Hyderabad

Marck Andrew said...

Even people who are experts at using Microsoft Excel don't often venture into the area of macros. Learn to control macros that allow you to create dialogue boxes, custom forms, and other objects to take communication between the spreadsheet and the user to new heights. custom excel reporting

Reshma said...

Amazing post.Thanks for sharing such a worthy. keep sharing like this.....
AWS Training in Bangalore
AWS Training in Pune
AWS Training in Hyderabad
AWS Training in Delhi
AWS Training in Gurgaon

dhanuesh said...

SAP BO Training in Bangalore
https://intellimindz.com/sap-bo-training-in-bangalore/
IntelliMindz is the best IT Training Institute in Bangalore with placement, offering 200 and more software courses with 100% Placement Assistance.

Tamil novels said...

Very nice blog. Keep blogging.
Tamil novels
Ramanichandran novels PDF
srikala novels PDF
Mallika manivannan novels PDF
muthulakshmi raghavan novels PDF
Infaa Alocious Novels PDF
N Seethalakshmi Novels PDF
Sashi Murali Tamil Novels PDF Download

Maneesha said...

Wonderful illustrated information. I thank you for that. No doubt it will be very useful for my future projects. Would like to see some other posts on the same subject!
data science coaching in hyderabad

Mrbk30 said...

Very Informative blog thank you for sharing. Keep sharing.

Best software training institute in Chennai. Make your career development the best by learning software courses.

azure training in chennai
devops training in chennai
power bi training in chennai

Reshma said...


Amazing post.Thanks for sharing.........
IELTS Coaching in Gurgaon
IELTS Coaching in Delhi

shweta said...
This comment has been removed by the author.
shweta said...

Very Informative blog thank you for sharing. Keep sharing.


Warehouse Services

Warehouse Services

Payroll outsourcing companies in india

Facility Management in Gurgaon

Fantasy Power11 Khelo Apne Dum Pe said...

who has scored most runs in ipl tournament The tournament has produced some of the most thrilling cricketing moments in the past. Several modern legends take part in the cash-rich league.These players have made all the records right from scoring most runs in IPL to picking most
wickets.Chennai Super Kings won the most recent edition of the tournament after beating Kolkata Knight Riders in the final. CSK turned around their luck after finishing in the seventh position in the points table last year.

Block said...

Thanks for one marvelous posting! I enjoyed reading it; you are a great
author. I will make sure to bookmark your blog and may come back
someday. I want to encourage that you continue your great posts, have
a nice weekend!
javascript training in chennai
mysql training in chennai
unix training in chennai
Software training institute in chennai

Assignment Help said...

Are you looking for Help with Assignments? Are you not able to choose the best experts? Great Assignment Help is provide the most famous Assignment helper Malaysia.

David Fincher said...

This post is so interactive and informative.keep update more information...
hadoop training in tambaram
Big data training in chennai

Matt Reeves said...

This post is so interactive and informative.keep update more information...
AWS Training in Tambaram
AWS Training in Chennai

360DigiTMG said...

A good blog always comes-up with new and exciting information and while reading I feel that this blog really has all those qualities that qualify a blog to be one.
data analytics training in hyderabad

360DigiTMG said...

Actually I read it yesterday but I had some thoughts about it and today I wanted to read it again because it is very well written.
data science course fee in hyderabad

360digiTMG.com said...

The article posted was very informative and useful. You people are doing a great job. Keep going. data analytics course in surat

Links For You said...

If it's not too much trouble, hold this awful do whatever it may take and I see take care of to more prominent of your fabulous blog entries. Bandicam Key Generator

jahanzaib33 said...


The most beguiling sound I have ever heard in that framework is your voice. The most flawless spot I have ever been to is in your arms. Birthday Wishes To Love

Data Analytics said...

Really very nice blog information for this one and more technical skills are improve,i like that kind of post.
Data Analytics Course in Pune

Fonegadgets said...

I look forward to reading more engaging content from you in the future. Keep up the excellent work!.

Aatif Anjum said...
This comment has been removed by the author.
MeenaKK said...

Thank you for sharing this insightful blog post. I found it to be informative. The points you've raised are both relevant and well-researched. Visit to AWS Classes in Pune

Emily Wilson said...
This comment has been removed by the author.
Belly Amy said...

Thanks for sharing this post. Yummy & delicious Anniversary Cakes in chandigarh, mohali, kharar, zirakpur and panchkula at an affordable prices.