>>375 クラスモジュール(Class1) Function hogesum(ByRef hage As hogeType) As Integer hogesum = hage.a + hage.b hage.a = 0 hage.b = 0 End Function
標準モジュール
Public Type hogeType a As Integer b As Integer End Type Sub test() Dim hoge As hogeType Dim c As New Class1 hoge.a = 1 hoge.b = 2 MsgBox c.hogesum(hoge) MsgBox hoge.a End Sub