Salve a tutti
sono alle prime armi con VBA per Corel e mi sono trovato di fronte al problema che passando da una Sub all'altra non si porta dietro i valori delle variabili ... riporto qui parte di codice per far capire il problema
la variabile Tota prima aumenta ma quando passo
Sub PROVA()
'
' Recorded 26/02/2007
'
' Description: Crea in automatico
ActiveDocument.Unit = cdrMillimeter
Dim x As Double, y As Double, w As Double, h As Double, Tota As Single, SP1 As Single, SP2 As Single
ActiveLayer.Import "Z:\LAVORI\M_P_S\MAILING\DOCUMENTI COREL\_Offerte\Autocomposizione\DIA 001.cdr", cdrCDR
ActiveDocument.Selection.GetBoundingBox x, y, w, h, False
Spostamenti
ActiveLayer.Import "Z:\LAVORI\M_P_S\MAILING\DOCUMENTI COREL\_Offerte\Autocomposizione\DIA 001.cdr", cdrCDR
ActiveDocument.Selection.GetBoundingBox x, y, w, h, False
Spostamenti
End Sub
-------------------------------------
Private Function Spostamenti()
ActiveDocument.Selection.GetBoundingBox x, y, w, h, True
ActiveShape.Move 0#, -Tota
Tota = Tota + h
End Function
----------------------------------------
Grazie per la risposta.
|