DIAdem Help

Content Type
Programming Language
Current manual
Table of Contents

Property: MaxPosition for Sheet

Property: MaxPosition for Sheet

Specifies within the worksheet the position of the cell that contains the last value.

Set oCellPosition = Object.MaxPosition
ObjectSheet
Object with this property
oCellPositionCellPosition
Returned object

The following example reads in the values of the worksheet columnwise from the second row and saves the values in channels of the first channel group:

Dim oCurrSheet
Set oCurrSheet = Workbook.Sheets(1)
Dim oCellBlock
Set oCellBlock = oCurrSheet.GetCellBlock(2,1)

Dim i, Name, oNewChannel
For i = 1 to oCurrSheet.MaxPosition.Column
  Name = oCurrSheet.GetCellValue(1,i)
  Set oNewChannel = oCellBlock.Channels.Add(Name) 
  Call Root.ChannelGroups(1).Channels.AddDirectAccessChannel(oNewChannel)
Next
In This Section
Was this information helpful?