Results 1 to 4 of 4

Open Event Error

Threaded View

  1. #1
    Registered User
    Join Date
    09-15-2010
    Location
    Michigan
    MS-Off Ver
    MS Office 2007
    Posts
    2

    Open Event Error

    Greets.

    I am relatively new to the world of programming for Excel, and am working to learn the basics. I have been going off of a Excel 2003 programming tutorial, from which I have learned a fair amount. Unfortunately, there is one issue I have been unable to find a solution to.

    I am trying to get a module to execute as soon as I open this particular excel document. The following code has been written into the "ThisWorkbook" Open Event window as told to do so in the tutorial:

    Private Sub Workbook_Open()
        TimeSheets
    End Sub

    The modules I have built are as follows:
    Module1
    MyFirstMacro
    TimeSheets

    Every time I open the excel file, instead of executing TimeSheets, I get an error: "Compile Error: Expected variable or procedure, not module."

    I have been unable to figure out exactly why this is happening. Any thoughts to help me get through, what I assume is an incredibly basic, hurdle? I would be much obliged!
    Last edited by gumdrop; 09-15-2010 at 07:19 PM.

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