-------------------------Monitor------------------------ The Newsletter for PC-Based Data Acquisition and Control Issue 86 www.windmill.co.uk September 2005 --------------------ISSN 1472-0221---------------------- Welcome to Issue 86 of Monitor. We hope you find the newsletter useful, but should you wish to cancel your subscription you can do so at https://www.windmill.co.uk/newsletter.html CONTENTS ======== * Windmill News: Data Acquisition Glossary Updated * Excel Corner: Macros and Borders * Windmill Notes: Five Facts about Windmill ________________________________________________________ ________________________________________________________ Windmill News: Data Acquisition Glossary Updated ________________________________________________________ Not sure of the meaning of a data acquisition or control term? Check our newly updated glossary of DAQ words and phrases. From Alternating Current to Zero Balance, with links to further information and in-depth articles. https://www.windmill.co.uk/glossary.html Also updated: our index of test, measurement and control articles and products. https://www.windmill.co.uk/subjects.html ________________________________________________________ ________________________________________________________ Excel Corner: Macros and Borders ________________________________________________________ Putting borders around spreadsheet cells often makes your data easier to read and allows you to group related items. You can clearly separate the columns or rows to suit your application. It is easy to do this in Excel using the Format menu. However, if you are using a macro to collect data you can also incorporate your border instructions there. Here is some code which will draw a thin blue line between the columns of Sheet1 of your spreadsheet. Sub Border Const xlContinuous = 1 Const xlThin = 2 Sheet1.UsedRange.Borders(xlInsideVertical).LineStyle = xlContinuous Sheet1.UsedRange.Borders(xlInsideVertical).Color = RGB(0, 0, 255) Sheet1.UsedRange.Borders(xlInsideVertical).Weight = xlThin End Sub For other colours simply edit the RGB values. The (xlInsideVertical) parameter specifies where you want the lines drawn. For other lines you would use a different parameter. For example, to have blue lines between the columns and the outline in red you would use. Sub Border Const xlContinuous = 1 Const xlThin = 2 Sheet1.UsedRange.Borders(xlInsideVertical).LineStyle = xlContinuous Sheet1.UsedRange.Borders(xlInsideVertical).Color = RGB(0, 0, 0) Sheet1.UsedRange.Borders(xlInsideVertical).Weight = xlThin Sheet1.UsedRange.Borders(xlEdgeBottom).LineStyle = xlContinuous Sheet1.UsedRange.Borders(xlEdgeBottom).Color = RGB(255, 0, 0) Sheet1.UsedRange.Borders(xlEdgeBottom).Weight = xlThin Sheet1.UsedRange.Borders(xlEdgeLeft).LineStyle = xlContinuous Sheet1.UsedRange.Borders(xlEdgeLeft).Color = RGB(255, 0, 0) Sheet1.UsedRange.Borders(xlEdgeLeft).Weight = xlThin Sheet1.UsedRange.Borders(xlEdgeRight).LineStyle = xlContinuous Sheet1.UsedRange.Borders(xlEdgeRight).Color = RGB(255, 0, 0) Sheet1.UsedRange.Borders(xlEdgeRight).Weight = xlThin Sheet1.UsedRange.Borders(xlEdgeTop).LineStyle = xlContinuous Sheet1.UsedRange.Borders(xlEdgeTop).Color = RGB(255, 0, 0) Sheet1.UsedRange.Borders(xlEdgeTop).Weight = xlThin End Sub The above example gives a border to all your data. You could instead specify a specific range of cells to outline. To do this replace "UsedRange" with a range reference. For example, to underline just the first row with a thick cyan line you would add ' Const xlThick = 4 Sheet1.Range("A1", "D1").Borders.LineStyle = xlContinuous Sheet1.Range("A1", "D1").Borders.Color = RGB(0, 255, 255) Sheet1.Range("A1", "D1").Borders.Weight = xlThick ' Other thicknesses of lines are available: xlHairline = 1 xlMedium = -4138 xlThick = 4 xlThin = 2 Similarly, there are other styles of line: xlContinuous = 1 xlDash = -4115 xlDashDot = 4 xlDashDotDot = 5 xlDot = -4118 xlDouble = -4119 xlLineStyleNone = -4142 xlSlantDashDot = 13 Why the seemingly meaningless numbers? That's the way Microsoft have chosen to do it. For more on using Excel with Windmill see https://www.windmill.co.uk/excel/ For more on macros and borders see http://www.microsoft.com/technet/scriptcenter/ ________________________________________________________ ________________________________________________________ Windmill Notes: Five Facts about Windmill ________________________________________________________ Five things you might not have realised about Windmill software... 1. Windmill Logger can record data from up to 100 instrument or sensor channels. For more channels simply open another copy of Logger. 2. Speed. When logging from 20 or more channels, the standard Windmill suite can log data at up to 200 samples per second. With the addition of the Steamer module, the rate rises to 100000 samples per second. 3. Windmill saves data in ASCII files with values separated by tabs, commas or spaces: you choose. 4. Windmill has drivers for RS232, RS485, RS422, Modbus, USB, GPIB, Ethernet, Wi-Fi and DDE devices. 5. You can use the Windmill from your own programs by means of the IML Tools Active X control. More details... https://www.windmill.co.uk/windmill.html https://www.windmill.co.uk/logger.html https://www.windmill.co.uk/tools.html ________________________________________________________ ________________________________________________________ * Copyright Windmill Software Ltd * Reprinting permitted with this notice included * For more articles see https://www.windmill.co.uk We are happy for you to copy and distribute this newsletter, and use extracts from it on your own web site or publication, providing the above notice is included and a link back to our website is in place. An archive of previous issues is at https://www.windmill.co.uk/newsletter.html and an index of articles at https://www.windmill.co.uk/newsletter.html Windmill Software Ltd, PO Box 58, North District Office, Manchester, M8 8QR, UK Telephone: +44 (0)161 834 6688 Facsimile: +44 (0)161 833 2190 E-mail: monitor@windmillsoft.com https://www.windmill.co.uk/ https://www.windmillsoft.com/
Subscribing
To receive Monitor every month please fill in your e-mail address below. We will not pass your address to any third parties, nor send you any unsolicited e-mail.