掲示板システム
ホーム
アクセス解析
カテゴリ
ログアウト
Function で戻り値を2つ返したい時は? (ID:125392)
名前
ホームページ(ブログ、Twitterなど)のURL (省略可)
本文
戻り値にしたいものが同じ型なら、配列にするという方法もあります。 Private Sub Command1_Click() Dim n() As Integer n = test(1, 2) MsgBox n(0) MsgBox n(1) End Sub Private Function test(a As Integer ,b As Integer) As Integer() Dim x(1) As Integer x(0) = a + b x(1) = a - b test= x End Function
←解決時は質問者本人がここをチェックしてください。
戻る
掲示板システム
Copyright 2020 Takeshi Okamoto All Rights Reserved.