Solved

DIM statement in VBA

Posted on 2012-04-04
2
467 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
ID: 37806898
Did you create a class module called FolderMonitor as described in Part 2?
0
 

Author Comment

by:Steph_M
ID: 37807225
Rookie mistake.

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

Steph
0

Featured Post

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Sometimes Outlook might have problems sending a message. There may be various causes- corrupted PST, AV scanner etc. The message, instead of going to the Sent Items folder, sits in the Outbox indefinitely. To remove it you can use a free tool cal…
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
Learn how to create and modify your own paragraph styles in Microsoft Word. This can be helpful when wanting to make consistently referenced styles throughout a document or template.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

910 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

22 Experts available now in Live!

Get 1:1 Help Now