Click here to Skip to main content
15,885,767 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: How to unlock a PC programmatically Pin
swap.kamble30-Sep-09 20:42
swap.kamble30-Sep-09 20:42 
Questionrotate images in picturebox on button click Pin
KIDYA2-Jul-09 20:54
KIDYA2-Jul-09 20:54 
AnswerRe: rotate images in picturebox on button click Pin
dan!sh 2-Jul-09 23:39
professional dan!sh 2-Jul-09 23:39 
AnswerRe: rotate images in picturebox on button click Pin
Zahid Khan Kakar30-Jul-09 19:02
professionalZahid Khan Kakar30-Jul-09 19:02 
QuestionHow To Install Applications of A Client PC Remotely Pin
Anoop Brijmohun2-Jul-09 20:36
Anoop Brijmohun2-Jul-09 20:36 
AnswerRe: How To Install Applications of A Client PC Remotely Pin
Dave Kreskowiak3-Jul-09 6:51
mveDave Kreskowiak3-Jul-09 6:51 
QuestionSpecial Function/Sub help... Pin
LorneCash2-Jul-09 18:30
LorneCash2-Jul-09 18:30 
AnswerRe: Special Function/Sub help... Pin
Johan Hakkesteegt2-Jul-09 21:31
Johan Hakkesteegt2-Jul-09 21: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 15:37
Hamid Amrbdi2-Jul-09 15:37 
AnswerRe: For Each Pin
Luc Pattyn2-Jul-09 16:03
sitebuilderLuc Pattyn2-Jul-09 16:03 
GeneralThanks Pin
Hamid Amrbdi2-Jul-09 16:31
Hamid Amrbdi2-Jul-09 16:31 
QuestionHow to change EXCEL 2007 Chart Series Color in a xlCylinderBarStacked in VB.Net Pin
mrbd082-Jul-09 10:02
mrbd082-Jul-09 10:02 
Questionmacro code that prompt for password or display message each time MS word is opened Pin
ChiSmile2-Jul-09 4:57
ChiSmile2-Jul-09 4:57 
AnswerRe: macro code that prompt for password or display message each time MS word is opened Pin
Dave Kreskowiak2-Jul-09 8:40
mveDave Kreskowiak2-Jul-09 8:40 
GeneralRe: macro code that prompt for password or display message each time MS word is opened Pin
ChiSmile2-Jul-09 17:34
ChiSmile2-Jul-09 17:34 
GeneralRe: macro code that prompt for password or display message each time MS word is opened Pin
Dave Kreskowiak2-Jul-09 18:33
mveDave Kreskowiak2-Jul-09 18:33 
GeneralRe: macro code that prompt for password or display message each time MS word is opened Pin
ChiSmile2-Jul-09 22:07
ChiSmile2-Jul-09 22:07 
JokeRe: macro code that prompt for password or display message each time MS word is opened Pin
dan!sh 2-Jul-09 8:45
professional dan!sh 2-Jul-09 8:45 
QuestionSocket programming Pin
Cory Kimble2-Jul-09 4:20
Cory Kimble2-Jul-09 4:20 
AnswerRe: Socket programming Pin
Luc Pattyn2-Jul-09 4:31
sitebuilderLuc Pattyn2-Jul-09 4:31 
GeneralRe: Socket programming Pin
Cory Kimble2-Jul-09 4:54
Cory Kimble2-Jul-09 4:54 
GeneralRe: Socket programming Pin
Luc Pattyn2-Jul-09 5:05
sitebuilderLuc Pattyn2-Jul-09 5:05 
GeneralRe: Socket programming Pin
Cory Kimble2-Jul-09 6:07
Cory Kimble2-Jul-09 6:07 
GeneralRe: Socket programming Pin
Luc Pattyn2-Jul-09 6:12
sitebuilderLuc Pattyn2-Jul-09 6:12 
GeneralRe: Socket programming Pin
Dave Kreskowiak2-Jul-09 9:09
mveDave Kreskowiak2-Jul-09 9: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.