473,385 Members | 1,582 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

multiple procedures under 1 event

Hi I am new to VBA. I am trying to use an onEvent to trigger multiple independent procedures. How do you code it so the each sub procedures fires independently of the other procedures?
Mar 28 '12 #1
4 2932
Rabbit
12,516 Expert Mod 8TB
Are you talking about multi-threading? Meaning running different code at the same time? VBA does not have that kind of functionality. Just run them sequentially.
Mar 28 '12 #2
No. It really is a simple question.

I have:
Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_Current()
  2. If Combo87 = "Closed" Then
  3. Me.Text85.Enabled = True
  4. Else
  5. End If
  6. End Sub
and I need to add the code
Expand|Select|Wrap|Line Numbers
  1. If PostImpReview = "No" Then
  2. Me.PostImpReviewDate = Null
  3. Me.PostImpReviewDate.Enabled = False
  4. Else
  5. Me.PostImpReviewDate.Enabled = True
  6. Me.PostImpReviewDate.SetFocus
  7. End If
so both actions occur - so it 2 procedures under the 1 event.

Thank you inadvance of you inparting your wisdom on me.
Mar 28 '12 #3
mshmyob
904 Expert 512MB
Move your end sub to the end.

cheers,
Mar 28 '12 #4
NeoPa
32,556 Expert Mod 16PB
Nevertheless, the simple question doesn't yet make sense.

Guessing what you might mean I would suggest (but frankly the question should make sense before the first post and not - maybe - after the third.) :
Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_Current()
  2.     With Me
  3.         .Text85.Enabled = (.Combo87 = "Closed")
  4.         With .PostImpReviewDate
  5.             If Me.PostImpReview = "No" Then
  6.                 .Value = Null
  7.                 .Enabled = False
  8.             Else
  9.                 .Enabled = True
  10.                 Call .SetFocus
  11.             End If
  12.         End With
  13.     End With
  14. End Sub
Mar 28 '12 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Taras | last post by:
Hello! I have a problem. I'm using a dataset in VB.NET with multiple tables with relations between them. I would like dataset to update to all related tables with right identity, when certain...
3
by: Melissa | last post by:
What specifically causes the Format event of a report's section to fire? Thanks! Melissa
1
by: Gianmaria | last post by:
hi, that's my problem. I have an object and this have a onConnectionChanged event. and when i use it on ny form i have also my event handler. Now, my user can add many of this objects to a list...
3
by: R Millman | last post by:
under ASP.NET, single stepping in debug mode appears not to stop within event procedures. i.e. 1) Create web page with submit button and event procedure for the click event in the code behind...
15
by: Iced Crow | last post by:
In C# I know that you can use delegates to assing multiple addresses of sub and functions to a delegate and have it fire multiple procedures... How do I do this in VB? I only know of assigning...
10
by: Siv | last post by:
Hi, I am struggling with VB.NET's lack of indexing on controls. I have a form with 23 text boxes and I want to be able to drag some items in a list to any one of those text boxes. In VB6 I...
12
by: cj | last post by:
I would like to have menu items a main menu bar that represent the days of the week. When you click on them they alternate from checked to unchecked. Right now I have 7 subs that look like this...
1
by: sfeher | last post by:
Hi All, I need to synchronize on multiple event notifications. After loading a number of scripts in my page ( using document.createElement('script') / appendChild ) I get a notification for...
2
by: Charles | last post by:
I have a Web application in VB.Net that has four seperate procdedures which need to run in order. Try cnDownload.Open() Dim cmdDeleteDownload As New SqlCommand("ProcDeleteDownload", cnDownload)...
1
by: jhadur | last post by:
I am not terribly familiar with SQL but we have a couple of programmers who need to have multiple set procedures to set to execute. Is there a way to do all the procedures as once or do they have to...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.