Steph_M
asked on
DIM statement in VBA
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?
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
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?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I didn't rename the class module to FolderMoniter. Thank you.
Steph