VBA: Replace Cell SetCExpressionValue


 Product:MicroStation
 Version:2023
 Environment:N\A
 Area:Cells
 Subarea:Replace Cell

Problem

While this statement functions in V8i, it will not work in MicroStation 2023
SetCExpressionValue "tcb->activeCell", NewCell, "REPCELL"

MicroStation 2023 returns the following error:
VBA Run-time error "not a structure or union member"

Solution

Replace the following statement,
SetCExpressionValue "tcb->activeCell", NewCell, "REPCELL"

With
SetCExpressionValue "tcb->activeCellUtf16", NewCell, "REPCELL"

See also

Using The Replace Cells Tool

MVBA FAQ

Other language sources

 Original Author:

Leonard Jones