VB6.0用掲示板の過去のログ(No.1)−VBレスキュー(花ちゃん)
[記事リスト] [新規投稿] [新着記事] [ワード検索] [過去ログ] [管理用]

投稿日: 2003/11/17(Mon) 16:13
投稿者いちゆ
Eメール
URL
タイトルRe^2: Fuction,typeについて

コードを見る限りは実行時エラーではなくてコンパイル時エラーですね。
プロシージャ内部ではなくて定義部に書いてはどうでしょう?
ついでに定義型を定義しているだけで、どこでも実現していないように見えます。

    Public Type tdatNow
        yNow As Integer
        str1Barth As String
        mNow As Integer
        str2Barth As String
        dNow As Integer
    End Type

    Public Type tdatBarth
        yBarth As Integer
        str1Barth As String
        mBarth As Integer
        str2Barth As String
        dBarth As Integer
    End Type
Dim datNow as tdatNow
Dim datBarth as tdatBath

また関数内部での
    datNow = Now
    datBarth = intAge
は、NowとintAgeはDate型ですが、代入先がDate型ではないため
変換エラーがおきます。
構造体のメンバごとに代入を書いていってください。


- 関連一覧ツリー (★ をクリックするとツリー全体を一括表示します)

- 返信フォーム (この記事に返信する場合は下記フォームから投稿して下さい)

- Web Forum -