Excel OLAPPaste VBA Example
The following is sample VBA relating to OLAPPaste.
The sample shows the following:
- Selecting a cell
- Copying a value
- Selecting a destination
- Commented code example of a standard Excel Paste
- Active code example of PowerOLAP OLAPPaste.
Sub Simple_OLAPPaste_Example()
Range("H9").Select
Selection.Copy
Range("G9").Select
'This is standard excel paste
'ActiveSheet.Paste
'Replace standard excel paste with "OLAPPaste"
Application.Run ("OLAPPaste")
Application.CutCopyMode = False
Calculate
End Sub