?
Solved

DIM statement in VBA

Posted on 2012-04-04
2
Medium Priority
?
492 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 34

Accepted Solution

by:
Norie earned 1600 total points
ID: 37806898
Did you create a class module called FolderMonitor as described in Part 2?
0
 
LVL 1

Author Comment

by:Steph_M
ID: 37807225
Rookie mistake.

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

Steph
0

Featured Post

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

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

This article will help to fix the below errors for MS Exchange Server 2013 I. Certificate error "name on the security certificate is invalid or does not match the name of the site" II. Out of Office not working III. Make Internal URLs and Externa…
Microsoft has changed the look and feel of Azure AD and Microsoft account sign-in pages so that you will have a more unified look and feel when moving between the two interfaces.
CodeTwo Sync for iCloud (http://www.codetwo.com/sync-for-icloud?sts=6554) automatically synchronizes your Outlook 2016, 2013, 2010 or 2007 folders with iCloud folders available via iCloud Control Panel. This lets you automatically sync them with…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
Suggested Courses

765 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