+ Reply to Thread
Results 1 to 4 of 4

statement invalid outside type block

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    09-19-2004
    Posts
    252

    statement invalid outside type block

    I have the following code that gives me the subject error. How can I fix it?

    Sub ShowEmailInfo()
         EmailInfo("email@email.com", "jbkLeftovers", "jbkNoPricePage") As String
    End Sub
    
    Function EmailInfo(strAddresses As String, LOqry As String, NPPqry As String)
         MsgBox "Your email is:" & strAddresses & " string 1 is:" & LOqry & " string 2 is:" & NPPqry
    End Function

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689
    Sub ShowEmailInfo() 
        EmailInfo "email@email.com", "jbkLeftovers", "jbkNoPricePage"
    End Sub

  3. #3
    Forum Contributor
    Join Date
    09-19-2004
    Posts
    252
    Perfect! Thank you!

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689
    Great, you're welcome.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1