+ Reply to Thread
Results 1 to 4 of 4

Defining a Variable

  1. #1
    Phil H
    Guest

    Defining a Variable

    Using Option Explicit gives me the compile error: Variable not defined, on
    this code. What would the correction be?

    Sub OpenCalendar()
    frmCalendar.Show
    End Sub


  2. #2
    Norman Jones
    Guest

    Re: Defining a Variable

    Hi Phil,

    The error suggests that a userform named frmCalendar was not found.

    Check that the forms name is correct.


    ---
    Regards,
    Norman



    "Phil H" <[email protected]> wrote in message
    news:[email protected]...
    > Using Option Explicit gives me the compile error: Variable not defined, on
    > this code. What would the correction be?
    >
    > Sub OpenCalendar()
    > frmCalendar.Show
    > End Sub
    >




  3. #3
    Norman Jones
    Guest

    Re: Defining a Variable

    Hi Phil,

    Verify also that the OpenCalendar sub is housed in a module in the same
    workbook as the userform.


    ---
    Regards,
    Norman



    "Norman Jones" <[email protected]> wrote in message
    news:[email protected]...
    > Hi Phil,
    >
    > The error suggests that a userform named frmCalendar was not found.
    >
    > Check that the forms name is correct.
    >
    >
    > ---
    > Regards,
    > Norman
    >
    >
    >
    > "Phil H" <[email protected]> wrote in message
    > news:[email protected]...
    >> Using Option Explicit gives me the compile error: Variable not defined,
    >> on
    >> this code. What would the correction be?
    >>
    >> Sub OpenCalendar()
    >> frmCalendar.Show
    >> End Sub
    >>

    >
    >




  4. #4
    Phil H
    Guest

    Re: Defining a Variable

    You are correct. I renamed the form and neglected to take that in to
    account. Thanks for the help

    "Norman Jones" wrote:

    > Hi Phil,
    >
    > The error suggests that a userform named frmCalendar was not found.
    >
    > Check that the forms name is correct.
    >
    >
    > ---
    > Regards,
    > Norman
    >
    >
    >
    > "Phil H" <[email protected]> wrote in message
    > news:[email protected]...
    > > Using Option Explicit gives me the compile error: Variable not defined, on
    > > this code. What would the correction be?
    > >
    > > Sub OpenCalendar()
    > > frmCalendar.Show
    > > End Sub
    > >

    >
    >
    >


+ 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