Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI
5 rating:
 1.39 out of 5     Rate this Document

How Can Measure Place Acquired Data in Different Columns?

Primary Software: Other NI Software>>Measure
Primary Software Version: 2.0
Primary Software Fixed Version: N/A
Secondary Software: N/A

Problem:
After acquiring some data and inserting it into an Excel spreadsheet column, I would like to programmatically move the current cell over one column in the Excel spreadsheet. This way it will be ready to place the next measurement in the next column. How can I do this with Measure?

Solution:
This functionality is not provided by Measure itself, but is attainable with Visual Basic for Applications (VBA), the built-in programming language in Excel. The code you will need in your macro or sheet code that can select a range of cells is as follows:

' Activate worksheet
Worksheets("sheet1").Activate

' Select cell block
Range("A1:H8") 'Range is on the active sheet

Some of the examples that ship with Measure include VBA code that should help get you started in the right direction. There are also examples in our Example Programs Database (EPD) that demonstrate this functionality - the link to the EPD is given in the Related Links section below. There is also on-line help in VBA that you can search to find helpful tips like the code snippet above. Finally, remember that National Instruments does not provide technical support for writing VBA code or Excel macros, so for more on-line resources, please check out the Microsoft Developer's Network.

Related Links:
NI Developer Zone: Measure Example Programs
Measure Support


Attachments:





Report Date: 12/06/2000
Last Updated: 01/21/2008
Document ID: 245CGKDM

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit