+ Reply to Thread
Results 1 to 3 of 3

Different behaviour of CommandButtons

  1. #1
    Registered User
    Join Date
    08-12-2012
    Location
    Česká republika
    MS-Off Ver
    Excel 2010
    Posts
    2

    Different behaviour of CommandButtons

    Hello everyone,
    I have experienced one problem I was not able to solve. I assigned this code to a CommandButton, which is placed directly in the sheet, and to another CommandButton, which is on a UserForm. The problem is that on the button in the sheet it works fine, but on the userform button I get an error: "Compile error: Variable not defined"

    Any idea where the problem could be?

    Please Login or Register  to view this content.

  2. #2
    Valued Forum Contributor
    Join Date
    02-12-2011
    Location
    The Netherlands
    MS-Off Ver
    365
    Posts
    818

    Re: Different behaviour of CommandButtons

    With 'Option Explicit'.

    Please Login or Register  to view this content.
    Or Without:
    Please Login or Register  to view this content.
    Or no variable:
    Please Login or Register  to view this content.
    Kind regards, Harry.

  3. #3
    Registered User
    Join Date
    08-12-2012
    Location
    Česká republika
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Different behaviour of CommandButtons

    Thank you! Your helpfulness saved a lot of my time.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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