Results 1 to 6 of 6

Thread: Eeeek Option Strict On [Resolved]

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2004
    Posts
    262

    Resolved Eeeek Option Strict On [Resolved]

    Just reading a post about Option Strict On, not being on by default, so thought I know I'll go into my project and switch it ON.
    Thinking to myself that It'll all be fine, low and behold I get about a trillion error messages. Anyway most are easy peasy. Am a little stuck on the below.
    I do a lot of interaction in my project with outlook. How would I do the below with option strict on.
    It says option strict disallows late binding, which is were I get stuck, as how can I pre assign the below before runtime, as I don't know how many e-mail will be in the inbox, if any.
    Anyway very confused.

    VB Code:
    1. For x = myitems.Count To 1 Step -1
    2.                 objSafeMail.item = myitems(x) 'errors here
    3.                 Me.txttotalemail.Text = CStr(CInt(Me.txttotalemail.Text) + 1)
    4.                 Me.txtcurrmess.Text = myitems(x).Subject 'errors here
    5.                 mtype = emailtype()
    6.  
    7.                 If typeemail(mtype) = True Then
    8.                     myitems(x).Delete() 'errors here
    9.  
    10.                 Else
    11.                     myitems(x).Move(destfolder) 'errors here
    12.  
    13.                 End If
    14.             Next x
    Last edited by Oliver1; Dec 15th, 2005 at 03:49 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width