Practical PC
Stripe Reviews
Web Building Guides
Computing Guides
Opinion
Downloads
About Practical PC


 
Sections
What is it?
How do I?
Where do I find?
 
Windows
Sound
Graphics
Communications
Printers
Networking
Storage
Digital Photography
Web building

!

 

Computing Guides

  PPC > Computing Guides > How do I...?  

Web Queries 4

In the final part of our mini series on Web Queries, Ian Waugh explains how to tart up a chart with a couple of buttons...

In the earlier parts of this series we saw how to use Web Queries to import data from a web page into a spreadsheet and how to access that data in a separate sheet - the object being to leave the clutter of imported data in one sheet while producing a good layout in another.

We'll finish by explaining how to create a couple of buttons to give a bit more zip to your front page.

Button it

You will undoubtedly need to refresh the data. You can, of course, use the Refresh function on the External Data Toolbar (see Part 3) but once you've created the sheet you may not want to leave the Toolbar hanging around. And in any case, using a button to do the job is more fun!

The first step is to create a button and for this we use the Drawing Toolbar. If you can't see this, go to the View>Toolbar menu and select it.

Go to the AutoShapes menu, select Basic Shapes and then pick a shape. We're going to use the Rounded Rectangle. Click on it then click anywhere on the worksheet and the shape will appear.

You can resize and reshape it by dragging the corners. Move the arrow over the shape so it changes into a cursor with arrows north, south, east and west, click on the shape and you can drag it to a new position.

Tart up the chart

Let's tart this up a bit before we go any further.

With the shape selected, click the down arrow to the right of the Fill Colour tool and select a colour.

Next, click on the 3D tool and select a shape. We're using the top left selection but make your own choice.

Macromancer

Now we're going to record a Macro and assign it to the button. Don't worry if you haven't used Macros before - it's easy!

Make sure the External Data Toolbar is available. From the Tools menu select Macros>Record New Macro.

Type in a name - Refresh seems a good one - and you can add a short description underneath if you like. Then click OK.

A small Macro window will appear. Click on the Refresh button in the External Data Toolbar.

Wait a moment for the program to do its stuff - i.e. refresh the data - then click on the Stop button in the Macro window. That's it!

Now right-click on the button and select Assign Macro. If other Macros are available you may see them in the list here but select the one you just recorded and click OK.

Make sure the handles aren't surrounding the button (click on an empty cell) and then when you left-click on the button, the data will be refreshed.

Well addressed

Create another button and this time we'll assign a Web address to it

Right-click on it and select Hyperlink from the menu. You will probably be presented with a list of recently-accessed web sites. You can select one of these or click on the Web Page button in the "Browse for" section and surf to the page you want. And again - that's it!

Now when you click on the button your browser will open at the selected web page.

You can further improve the buttons by adding text (right-click, select Edit Text) and we'll leave you to decide upon the contents, style and colour...

^top
 

Ian Waugh


 
counter