+ Reply to Thread
Results 1 to 2 of 2

Error in VBA code to conditionally add ActiveX command buttons and assign click events

  1. #1
    Registered User
    Join Date
    06-29-2023
    Location
    Mumbai, India
    MS-Off Ver
    Microsoft Office Home and Student 2021
    Posts
    1

    Question Error in VBA code to conditionally add ActiveX command buttons and assign click events

    I am creating a spreadsheet for my budget, where some cells keep track of my expenses in a month in a particular field. For example, a cell might keep track of all my expenses on food in June 2023. Such cells start with a "=" sign followed by a mathematical expression with numbers, plus or minus signs, and parentheses. For example: "=345+86-72+782".

    I am trying to write VBA code for a macro that detects all such cells in the active sheet and assigns ActiveX command buttons to each of these cells which on clicking open an input box where I can type in a new expense (like "+31") and it will get added to the cell.

    I am running into several errors, can someone help?

    Please Login or Register  to view this content.

  2. #2
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,304

    Re: Error in VBA code to conditionally add ActiveX command buttons and assign click events

    You are in the process of developing a nightmare, ActiveX controls imbedded on a worksheet are notoriously unstable.
    I would urge you to read up on the web "reasons not to use ActiveX on the sheet.
    Torachan,

    Mission statement; Promote the use of Tables, Outlaw the use of 'merged cells' and 'RowSource'.

+ 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. ActiveX Command Button combined with ActiveX List Boxes – VBA Code Needed
    By Stlcards13 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-26-2017, 02:56 PM
  2. [SOLVED] Trap events on UserForm multiple command buttons in one sub
    By EssoExplJoe in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 07-28-2016, 10:02 AM
  3. Infor bubble on activeX command buttons
    By EMcCausland in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-16-2016, 05:39 PM
  4. [SOLVED] One Sub for Multiple Command Buttons (ActiveX Control)
    By Raymundus in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-19-2016, 11:30 AM
  5. [SOLVED] Command Buttons Form Control or ActiveX
    By Epscan in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-17-2014, 01:41 PM
  6. [SOLVED] Conditionally Hide or deactivate code in an activeX command Button.
    By Kramxel in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-26-2014, 12:19 PM
  7. use a command button to click other command buttons
    By fcharl9 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-20-2013, 08:48 PM

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