| | |
Getting a button's code to run programatically
Please support our VB.NET advertiser: Programming Forums - DaniWeb Sister Site
Thread Solved |
•
•
Join Date: Sep 2006
Posts: 90
Reputation:
Solved Threads: 0
I have a button that when pressed displays all the customers in the table. Other buttons are used to add or delete a customer record, or upload a batch of numbers. How can I fire the Click event of the View button after the Add or Delete buttons code has been executed? For example, this is the code for the Upload button
I want the code that is in my view button to execute after my UploadScript() Sub. Any ideas?
VB.NET Syntax (Toggle Plain Text)
Private Sub btnImport_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnImport.Click AddBatch(LocationCode, filename) BuildScript() SaveScript() UploadScript() End Sub
I want the code that is in my view button to execute after my UploadScript() Sub. Any ideas?
Hi,
Add the below code within your sub where xxx is the name of the button you want to click:
xxx.PerformClick()
Add the below code within your sub where xxx is the name of the button you want to click:
xxx.PerformClick()
It is never about the number of languages you know, you either have the logic of programming or you don't ...
Some of the codes I post are collected from different sites during the past couple of years, so I would like to thank them for their help and for enabling me to help.
Some of the codes I post are collected from different sites during the past couple of years, so I would like to thank them for their help and for enabling me to help.
![]() |
Similar Threads
- Help:What would happen when the code is run? (C++)
- last button code (VB.NET)
- Alert box, then cancel action (Javascript) (JavaScript / DHTML / AJAX)
- How do i run perl on windows 98 (Perl)
- [Tweak] Renaming your Start Button (Windows tips 'n' tweaks)
- Recognizing when a button is pressed. (Java)
- Printing using Web Control Print button VB.NET (JavaScript / DHTML / AJAX)
- Printing using Web Control Print button. (ASP.NET)
- Run-Time Error 424 (Visual Basic 4 / 5 / 6)
Other Threads in the VB.NET Forum
- Previous Thread: Background program that runs straight away
- Next Thread: WrapText in an AxOWC10.AxSpreadsheet Control
Views: 2509 | Replies: 2
| Thread Tools | Search this Thread |
Tag cloud for VB.NET
.net 2005 2008 access account application arithmetic array arrays basic bing button buttons c# center check checkbox code combobox component convert crystalreport data database databasesearch datagrid datagridview design designer dissertation dissertations dropdownlist excel file-dialog folder ftp generatetags google gridview hardcopy highlighting images inline insert installer intel internet listview mobile monitor ms net networking output passingparameters peertopeervideostreaming picturebox picturebox1 plugin port print printing problem problemwithinstallation project save searchbox searchvb.net select serial server soap sorting studio syntax table tcp text textbox time timer toolbox trim update updown user vb vb.net vb.netcode vb.netformclosing()eventpictureboxmessagebox vb2008 vbnet view visual visualbasic visualbasic.net visualstudio visualstudio2008 web wpf





