+ Reply to Thread
Results 1 to 5 of 5

Help with Unable to set the OnAction property of the Button class error

  1. #1
    Forum Contributor
    Join Date
    01-04-2013
    Location
    Tampa, Florida
    MS-Off Ver
    Excel 2013
    Posts
    142

    Help with Unable to set the OnAction property of the Button class error

    I'm trying to debug a macro that was written by someone else who is no longer with my company. My VBA skills are "ok", but I'm running into a problem.

    The section of code where I'm running into the error is:

    Please Login or Register  to view this content.
    I get the error at
    Please Login or Register  to view this content.
    calc is a variable representing a specific sheet within the workbook
    master_wb_name is set as a string equal to ActiveWorkbook.Name
    Rev_Rec_Cal_Button2 is a call to another sub within the workbook

    This workbook is hosted on a sharing site within my organization. Usually it runs just fine. Where the error comes in is when someone downloads the file even though they already have a version in their download folder. This changes the name of the workbook to "Workbook Name (1)", or "Workbook Name (2)", etc.

    Is there a way to solve for this error without trying to explain to the folks that download the file that they already have a version downloaded?

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Help with Unable to set the OnAction property of the Button class error

    Is this code that creates the button in the same workbook as master_wb_name?
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Forum Contributor
    Join Date
    01-04-2013
    Location
    Tampa, Florida
    MS-Off Ver
    Excel 2013
    Posts
    142

    Re: Help with Unable to set the OnAction property of the Button class error

    Yes, same workbook. Also, the sub with the code that gets the error is in the same module as Rev_Rec_Cal_Button2.

  4. #4
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Help with Unable to set the OnAction property of the Button class error

    I don't think you need to qualify the workbook name. See if this works.

    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    01-04-2013
    Location
    Tampa, Florida
    MS-Off Ver
    Excel 2013
    Posts
    142

    Re: Help with Unable to set the OnAction property of the Button class error

    Ah, so simple. That seems to do it. Thank you!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. “Unable to get the VLookup property of the WorksheetFunction Class” error
    By lougs7 in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 10-13-2015, 11:22 AM
  2. error msg : unable to get the PivotItems property of the PivotField class
    By Kim75 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-12-2015, 03:56 PM
  3. Error: Unable to set a Visible Property of a Worksheet Class.
    By LgAo in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-08-2014, 04:59 AM
  4. Error: Unable to set the XValues property of the Series class
    By yerromnitsuj in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 09-14-2011, 04:12 PM
  5. Replies: 1
    Last Post: 11-22-2010, 06:10 AM
  6. Error Unable to set name property of series class
    By realniceguy5000 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-01-2010, 06:04 AM
  7. Replies: 2
    Last Post: 12-13-2007, 09:59 AM

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