CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 7 of 7

Threaded View

  1. #1
    Join Date
    Nov 2005
    Posts
    95

    public object modules?

    Hello I set up a "type", included in my .bas module...seems to work fine:

    Code:
    Public Type DynaData
     FramePar As Integer
     VIndex As Integer
     EEPloc As Integer
     NoRespOK As Boolean
    End Type
    In my main form General Declarations I do:
    Code:
    Dim RadBut(200) As DynaData
    I use this without problem in various routines & various calculations. However I need to pass this type to a sub (as well as similar types to the same sub, which is why I want to create a sub in the first place)

    Code:
    call MYSub(123, RadBut() )    'should it be plain RadBut or RadBut()?
    such as:
    Code:
      Public Sub MySub(intAbc as Integer, FakeType as DynaData)
    ...however here it gives a compiler error saying
    "only public user defined types defined in public object modules can be used as parameters..... "

    Ok so where should I put my type definition (what IS a public object module?) or how do I make one of my private modules public?
    Last edited by vbcandies; January 2nd, 2010 at 03:14 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured