Blogs from Wise Owl on Excel Visual Basic in Excel (page 1 of 3)

Showing blogs 1-20 (out of 49)

VBA code to create a chart and textbox, and copy them to Word

Posted by Andy Brown on 03 October 2014 | no comments

Charts in VBA are a bit weird: this blogs highlights some of their foibles, by showing how charts are really just special shapes, which contain shapes of their own!

Programmatically searching websites using VBA

Posted by Andy Brown on 19 September 2014 | no comments

I've already pinched (with permission!) the ideas of Fergus Cairns to explain ways to run automatic searches on popular websites like Google; this blog gives an update on the same topic.

Tags:   Excel | Excel Visual Basic    |    VBA macros | References

How to create autoshapes, lines and connectors in VBA macros

Posted by Andy Brown on 25 January 2014 | no comments

You can use Visual Basic within Excel, PowerPoint or Word to draw shapes, format them and even assign macros to run - this long blog gives lots of ideas of how to proceed!

Tags:   Excel | Excel Visual Basic    |    VBA macros | General

Advice on how to scrape tables of data or HTML from webpages using VBA

Posted by Andy Brown on 13 January 2014 | no comments

You can use VBA to extract data from web pages, either as whole tables or by parsing the underlying HTML elements. This blog shows you how to code both methods (the technique is often called "web-scraping").

Tags:   Excel | Excel Visual Basic    |    VBA macros | General

Getting the Calendar control to work in Excel 2010 onwards

Posted by Andy Brown on 13 January 2014 | 1 comment

The calendar control for user forms is built into versions of Excel up to 2007, but has to be imported for later versions - this blog shows how to do this!

Tags:   Excel | Excel Visual Basic    |    VBA macros | User forms

How to use environment variables like USERNAME in VBA

Posted by Andy Brown on 25 November 2013 | no comments

You can get at all sorts of system information within Visual Basic for Applications by using environment variables - this blog shows you how to get at your user's name, computer name and much more besides.

Tags:   Excel | Excel Visual Basic    |    VBA macros | General

How to loop over enumerations in VBA

Posted by Andy Brown on 07 November 2013 | no comments

A short blog explaining how to use Visual Basic for Applications to loop over enumerations.

Want to wind up your neighbour? Try this annoying Excel VBA code!

Posted by Andy Brown on 14 May 2013 | no comments

If you have a colleague who trusts you, you could always betray this trust by sending them a workbook which misbehaves: it won't close and you can't leave it!

Write a macro in VBA to fill in an IE form (Internet Explorer)

Posted by Andy Brown on 02 November 2012 | no comments

You can use VBA to talk to Internet Explorer, providing that you understand the structure of the web page you're talking to. This blog shows how to do this!

Tags:   Excel | Excel Visual Basic    |    VBA macros | References

Using Excel VBA to Label Multiple Series in a Chart

Posted by Andrew Gould on 30 May 2012 | 2 comments

This follow-up article to a previous blog describes how to label the data points in multiple series in Excel using VBA.

Capture Excel application events - event sinks

Posted by Andy Brown on 06 March 2012 | 1 comment

It's not for the faint-hearted, but there is a way to capture application events (such as someone trying to create a new workbook) in Excel, using something called an event sink.  This blog explains how you might go about creating an event sink.

Tags:   Excel | Excel Visual Basic    |    VBA macros | Classes

Macro Security and Digital Certificates in VBA

Posted by Andrew Gould on 06 March 2012 | 1 comment

Understanding macro security is essential if you want the code you've written to run when it's supposed to, and at the same time protect yourself from potentially malicious code. This blog explains how to change your security settings to an appropriate level and discusses the ins and outs of digital certification.

Collections of class object using Excel VBA

Posted by Andy Brown on 05 March 2012 | 4 comments

If you've learnt how to create your own objects using classes in Excel VBA, the next step is to learn how to group them together into collections. This on-line tutorial will show you how.

Tags:   Excel | Excel Visual Basic    |    VBA macros | Classes

Creating classes in VBA - class modules

Posted by Andy Brown on 05 March 2012 | 5 comments

Those who want to add spice to their VBA programming can learn how to create classes, or class modules, and become object-orientated programmers.  It's difficult, but fun - and this multi-part blog will guide you along the way.

Tags:   Excel | Excel Visual Basic    |    VBA macros | Classes

Using Excel Add-Ins to Share VBA Code

Posted by Andy Brown on 05 March 2012 | 2 comments

If you've written a killer function, you'll want to be able to share it between workbooks. The best way to do this is using an add-in.

Tags:   Excel | Excel Visual Basic    |    VBA macros | References

Advanced controls in userforms with VBA macros

Posted by Andy Brown on 28 February 2012 | 4 comments

The two previous parts of this mini-blog have shown how to draw forms and how to write code to handle form events. This final part shows how to add some of the more exotic controls to user forms, like combo boxes, list boxes, multipage controls, spinners and option buttons.

Tags:   Excel | Excel Visual Basic    |    VBA macros | User forms

Writing VBA macros to work with user forms

Posted by Andy Brown on 28 February 2012 | no comments

The previous part of this three-part series showed how to draw user forms; this part shows how to write macros to get them to work (the final part shows how to use some of the more advanced controls, such as combo boxes and MultiPages).

Tags:   Excel | Excel Visual Basic    |    VBA macros | User forms

Drawing UserForms in the VBA code editor

Posted by Andy Brown on 28 February 2012 | no comments

Learn how to create your own custom dialog boxes in VBA, using UserForms. This is the first part of a three-part series (the other parts are on Writing Code for UserForms and Creating Advanced Controls).

Tags:   Excel | Excel Visual Basic    |    VBA macros | User forms

Writing functions for Excel using VBA

Posted by Andy Brown on 24 February 2012 | no comments

On-line training in writing functions using VBA, for use either within other VBA programs or within Excel itself.

Tags:   Excel | Excel Visual Basic    |    VBA macros | Functions

Arrays in Visual Basic for Applications macros

Posted by Andy Brown on 24 February 2012 | no comments

You can use arrays (multiple variables) in VBA to speed up code - and they are also invaluable for processing CSV files and the like.