Click here to Skip to main content
15,561,422 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: How to unlock a PC programmatically Pin
swap.kamble30-Sep-09 21:42
swap.kamble30-Sep-09 21:42 
Questionrotate images in picturebox on button click Pin
KIDYA2-Jul-09 21:54
KIDYA2-Jul-09 21:54 
AnswerRe: rotate images in picturebox on button click Pin
dan!sh 3-Jul-09 0:39
professional dan!sh 3-Jul-09 0:39 
AnswerRe: rotate images in picturebox on button click Pin
Zahid Khan Kakar30-Jul-09 20:02
professionalZahid Khan Kakar30-Jul-09 20:02 
QuestionHow To Install Applications of A Client PC Remotely Pin
Anoop Brijmohun2-Jul-09 21:36
Anoop Brijmohun2-Jul-09 21:36 
AnswerRe: How To Install Applications of A Client PC Remotely Pin
Dave Kreskowiak3-Jul-09 7:51
mveDave Kreskowiak3-Jul-09 7:51 
QuestionSpecial Function/Sub help... Pin
LorneCash2-Jul-09 19:30
LorneCash2-Jul-09 19:30 
AnswerRe: Special Function/Sub help... Pin
Johan Hakkesteegt2-Jul-09 22:31
Johan Hakkesteegt2-Jul-09 22:31 
It sound like you are looking for object oriented programming.

Create a class with properties for each variable. Instantiate the class in your "outer" sub / function, set the properties, use them, and then when you want to call your other sub / function, you only make a byval of your class, and pass the instantiated object to it.

Something like:

Module ExampleModule

    Private Sub ExampleSub()
        Dim MyExampleObject As New Example
        MyExampleObject.MyVariable = "Example"

        'some loop here
        MyFunctionToBeCalledAboutEightTimes(MyExampleObject)
        'next loop
    End Sub

    Function MyFunctionToBeCalledAboutEightTimes(ByVal MyExample As Example) As Integer
        If MyExample.MyVariable = "Example" Then
            Return 0
        Else
            Return 1
        End If
    End Function

End Module

Public Class Example

    Private _MyVariable As String
    Public Property MyVariable() As String
        Get
            Return _MyVariable
        End Get
        Set(ByVal value As String)
            _MyVariable = value
        End Set
    End Property

End Class


My advice is free, and you may get what you paid for.

QuestionFor Each Pin
Hamid Amrbdi2-Jul-09 16:37
Hamid Amrbdi2-Jul-09 16:37 
AnswerRe: For Each Pin
Luc Pattyn2-Jul-09 17:03
sitebuilderLuc Pattyn2-Jul-09 17:03 
GeneralThanks Pin
Hamid Amrbdi2-Jul-09 17:31
Hamid Amrbdi2-Jul-09 17:31 
QuestionHow to change EXCEL 2007 Chart Series Color in a xlCylinderBarStacked in VB.Net Pin
mrbd082-Jul-09 11:02
mrbd082-Jul-09 11:02 
Questionmacro code that prompt for password or display message each time MS word is opened Pin
ChiSmile2-Jul-09 5:57
ChiSmile2-Jul-09 5:57 
AnswerRe: macro code that prompt for password or display message each time MS word is opened Pin
Dave Kreskowiak2-Jul-09 9:40
mveDave Kreskowiak2-Jul-09 9:40 
GeneralRe: macro code that prompt for password or display message each time MS word is opened Pin
ChiSmile2-Jul-09 18:34
ChiSmile2-Jul-09 18:34 
GeneralRe: macro code that prompt for password or display message each time MS word is opened Pin
Dave Kreskowiak2-Jul-09 19:33
mveDave Kreskowiak2-Jul-09 19:33 
GeneralRe: macro code that prompt for password or display message each time MS word is opened Pin
ChiSmile2-Jul-09 23:07
ChiSmile2-Jul-09 23:07 
JokeRe: macro code that prompt for password or display message each time MS word is opened Pin
dan!sh 2-Jul-09 9:45
professional dan!sh 2-Jul-09 9:45 
QuestionSocket programming Pin
Cory Kimble2-Jul-09 5:20
Cory Kimble2-Jul-09 5:20 
AnswerRe: Socket programming Pin
Luc Pattyn2-Jul-09 5:31
sitebuilderLuc Pattyn2-Jul-09 5:31 
GeneralRe: Socket programming Pin
Cory Kimble2-Jul-09 5:54
Cory Kimble2-Jul-09 5:54 
GeneralRe: Socket programming Pin
Luc Pattyn2-Jul-09 6:05
sitebuilderLuc Pattyn2-Jul-09 6:05 
GeneralRe: Socket programming Pin
Cory Kimble2-Jul-09 7:07
Cory Kimble2-Jul-09 7:07 
GeneralRe: Socket programming Pin
Luc Pattyn2-Jul-09 7:12
sitebuilderLuc Pattyn2-Jul-09 7:12 
GeneralRe: Socket programming Pin
Dave Kreskowiak2-Jul-09 10:09
mveDave Kreskowiak2-Jul-09 10:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.