Solved

DIM statement in VBA

Posted on 2012-04-04
2
464 Views
Last Modified: 2012-04-20
Ok Experts,

I'm not a programmer and this is a programming basic so I know this is quick points for you!

I'm following the instructions on this link:

http://techniclee.wordpress.com/2010/12/16/new-mail-notification-for-an-additional-mailbox/

When I get to Step 3, the DIM statement fails with User-defined type not defined.  I moved it from line 1 to line 8 and it still doesn't work.

     01 Dim objFM1 As FolderMonitor  
     02    
     03 Private Sub Application_Quit()  
     04     Set objFM1 = Nothing  
     05 End Sub  
     06    
     07 Private Sub Application_Startup()  
     08     Set objFM1 = New FolderMonitor  
     09     'Edit the folder path on the next line as needed.'  
    10     objFM1.FolderToWatch OpenOutlookFolder("Mailbox - TechnicLee\Inbox")  
    11 End Sub

Can you please tell me where to place that statement and if I need to anything else to make this code snipet work?
0
Comment
Question by:Steph_M
2 Comments
 
LVL 33

Accepted Solution

by:
Norie earned 400 total points
Comment Utility
Did you create a class module called FolderMonitor as described in Part 2?
0
 

Author Comment

by:Steph_M
Comment Utility
Rookie mistake.

I didn't rename the class module to FolderMoniter. Thank you.

Steph
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

As with any other System Center product, the installation for the Authoring Tool can be quite a pain sometimes. This article serves to help you avoid making these mistakes and hopefully save you a ton of time on troubleshooting :)  Step 1: Make sur…
Create high volume marketing opportunities using email signatures with these top 10 DOs and DON'Ts of email signature marketing.
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now