It may be a simple but I can not configure it out.


1. I have userform1 & where I store height & width value of my rectangle shape in form of array.
2. Now I require that value(array) in my module2.


How to import that array in module2.


Any solution will be highly appreciated.


In the Userform1
Private Sub CommandButton1_Click()
Dim h As Double
Dim w As Double
Dim port_array() As Variant
ReDim port_array(0 To 1)
h = Me.TextBoxHeight.Value
w = Me.TextBoxWidth.Value
End Sub

In the module2
Sub import_array()
Dim bshp as shape
Dim h As Double
Dim w As Double
Dim port_array() As Variant
w = port_array(0)
h = port_array(1)
Set bshp = ActivePresentation.Slides(1).Shapes("rectangle1")
With bshp
    .Width = w
    .Height = h
End With
End Sub