Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

After modifying the VBA code

Status
Not open for further replies.

wellas666

Programmer
Feb 10, 2006
23
GB
Hi

In Microsoft Outlook 2000.
After modifying the VBA code, do I need to close-save-open Outlook so that the it will run on the new code? Is there any compiling behind?

Thank you in advance.
 
You do not need to save the Outlook session until you close it. Of course, you can save and compile the code at any time. What version are you running?

I hope this helps.



Ron Repp
 
Thank you.

I am using Outlook 2000.
There is a few fimes after I modifying the VBA code it still executed the old code.
How to compile the code?
 
In the VBE, go to Debug, Compile project. If there are errors in your code, it will sport them. This is the biggest advantage to compiling VBA.

I've never encountered what you are saying, though I understand it. For some reason, Outlook is remembering your previous version, so perhaps compiling it is the answer.

I hope this helps.



Ron Repp
 
I have just go to Debug and found "Compile Project" was grey. Any idea?
 
Write a snippet of code and then comment it out and try again.

Code:
'This

I hope this helps.

Ron Repp
 
I tried what you said but "Compile Project1" was still grey.
I think I should tell you that all my code is under "VbaProject.OTM - ThisOutlookSession (Code)
 
Put my mouse cursor in following Sub and then press F5, I can run it:
Private Sub try()
MsgBox "aaaaa"
End Sub
It can fire "Sub objItems_ItemAdd(ByVal Item As Object)" when new email comes.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top