+ Reply to Thread
Results 1 to 2 of 2

Macro and Form Names

  1. #1
    Registered User
    Join Date
    08-11-2008
    Location
    United Kingdom
    MS-Off Ver
    Excel 2013 64-bit
    Posts
    57

    Macro and Form Names

    I'm no expert at VBA, but I was wondering why I can't have the macro name the same as the name of the form which opens when a button is clicked on?

    For example, below the macro name is "ShowHighlights", and the name of the form is called "Highlights". If I change the macro name to "Highlights" and then click on the button, it displays an error.

    \1

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,481

    Re: Macro and Form Names

    because the same names confuse the compiler. It can't tell whether you meant userform object or routine name.
    Cheers
    Andy
    www.andypope.info

+ 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