Solved

DIM statement in VBA

Posted on 2012-04-04
2
470 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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

Suggested Solutions

What does UTC stand for?  “Coordinated Universal Time” – Think of this as the true time on Planet Earth that never changes with the exception of minor leap seconds here and there to account for the changes in the planet's rotation.   What does th…
Find out what you should include to make the best professional email signature for your organization.
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…
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…

803 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