Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

DIM statement in VBA

Posted on 2012-04-04
2
Medium Priority
?
504 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 35

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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

By default Outlook 2016 displays only one time zone in the Calendar. The following article explains how to display two time zones in one calendar view.
Are you looking for the options available for exporting EDB files to PST? You may be confused as they are different in different Exchange versions. Here, I will discuss some options available.
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…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

604 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