| | |
calling event form module
Thread Solved |
•
•
Join Date: May 2009
Posts: 372
Reputation:
Solved Threads: 26
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
Private Sub Command1_Click() Call sohel(Image1) End Sub
Module 1
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
Public Function sohel(a As Image) a.Visible = False End Function
You cannot use a function to change yje visible factor of an image.
If you want to click the button then
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
Private Sub Command1_Click() if image1.visible=false then image1.visible=true elseif image1.visible=true then image1.visible=false end if end sub
Last edited by Jupiter 2; 20 Days Ago at 10:37 am. Reason: if end if tags
If ALL my answers are wrong, only then will I read the question
•
•
Join Date: Mar 2009
Posts: 810
Reputation:
Solved Threads: 147
0
#4 20 Days Ago
Jupiter2,
Here is a way to shorten you comman1_click code...
Just a piece of knowledge I thought I would pass along.
As for the OP, deftones, Jupiter2 has most of what you need to accomplish what you want but allow me to clarify more...
As of right now I cannot see a way to directly call an images click event but you can create a public sub proceedure in your form and call it...
in module...
In Form...
However, if you were to call a command button then you could call it directly by...
Good Luck
Here is a way to shorten you comman1_click code...
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
Image1.Visible = Not Image1.Visible
Just a piece of knowledge I thought I would pass along.
As for the OP, deftones, Jupiter2 has most of what you need to accomplish what you want but allow me to clarify more...
As of right now I cannot see a way to directly call an images click event but you can create a public sub proceedure in your form and call it...
in module...
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
Call Form1.MySub
In Form...
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
Public Sub MySub() Call Image1_Click End Sub
However, if you were to call a command button then you could call it directly by...
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
Form1.Command1.Value = True
Good Luck
If anyone has helped you solve your problem, please mark your thread as solved.
Thanks
Thanks
![]() |
Similar Threads
- calling sub from a different form (VB.NET)
- Initialisation of Variables (Visual Basic 4 / 5 / 6)
- Calling This Function (C++)
- calling an asp method from java script embeded in Html (ASP.NET)
- loadin a form (Visual Basic 4 / 5 / 6)
- Pass Controls of Access-Form to sub in module (Visual Basic 4 / 5 / 6)
- Closed event of a form (C#)
- Event List for Car Show Fan Site - (PHP)
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: Error checking for an existing record
- Next Thread: making objects invisible
| Thread Tools | Search this Thread |
* 6 429 2007 access activex add age application basic beginner birth bmp calculator cd cells.find click client code college component connection connectionproblemusingvb6usingoledb copy creat ctrl+f data database datareport date delete dissertations dissertationthesis dissertationtopic edit error excel excelmacro file filename form hardware header iamthwee image inboxinvb internetfiledownload keypress label listbox listview liveperson login looping machine microsoft movingranges number objectinsert open oracle password prime program prompt range-objects readfile reading record refresh remotesqlserverdatabase report save search sendbyte sites sort sql sql2008 sqlserver subroutine tags textbox time urldownloadtofile vb vb6 vb6.0 vba visual visualbasic visualbasic6 web window windows





