+ Reply to Thread
Results 1 to 6 of 6

Macro Deletes Form Control Button

  1. #1
    Forum Contributor
    Join Date
    04-27-2009
    Location
    Dallas, TX
    MS-Off Ver
    Office 365
    Posts
    215

    Macro Deletes Form Control Button

    I have a macro that cleans up a report from our accounting system. I usually run this macro from my personal workbook as a button from my quick access toolbar. However, I need to put the macro in to a file that will be used by several team members. So I was thinking of adding a form button and pointing the form button to that macro. The problem is that part of the macro deletes some of the top rows and it is deleting the form button. I've tried moving it to an area that does not get deleted, but of course it will move the button up. I've also tried locking the spreadsheet, but of course, the macro can't run while the sheet is locked.

    What should i do?

  2. #2
    Forum Expert nankw83's Avatar
    Join Date
    08-31-2015
    Location
    Kuwait
    MS-Off Ver
    365
    Posts
    1,712

    Re: Macro Deletes Form Control Button

    I normally insert a square shape and assign the macro to it … Right click the shape & click format shape & from there under properties, select "Don't move or size with cells"

    Edit : You can do the same thing with a form button, right click > Format Control > Properties > Don't move or size with cells
    Last edited by nankw83; 04-25-2020 at 06:39 PM.

  3. #3
    Forum Contributor
    Join Date
    04-27-2009
    Location
    Dallas, TX
    MS-Off Ver
    Office 365
    Posts
    215
    And that will prevent it from being deleted as well as moving or resizing?

  4. #4
    Forum Expert nankw83's Avatar
    Join Date
    08-31-2015
    Location
    Kuwait
    MS-Off Ver
    365
    Posts
    1,712

    Re: Macro Deletes Form Control Button

    Yes, I just tired it in a sample file & it worked !

  5. #5
    Forum Contributor
    Join Date
    04-27-2009
    Location
    Dallas, TX
    MS-Off Ver
    Office 365
    Posts
    215

    Re: Macro Deletes Form Control Button

    Oh it is so beautiful! lol Thank you!

  6. #6
    Forum Expert nankw83's Avatar
    Join Date
    08-31-2015
    Location
    Kuwait
    MS-Off Ver
    365
    Posts
    1,712

    Re: Macro Deletes Form Control Button

    Glad to help … Please mark this thread as solved by selecting Thread Tools from the menu link above & add to the reputation(s) of those who helped

+ 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. Which Macro Is in My Form Control Button?
    By eNinjaInTraining in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-30-2018, 11:18 PM
  2. How to move a form control button when macro inserts a row above it
    By Allen B. in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-31-2015, 10:17 AM
  3. Button (Form Control) - Macro enabled - VBA help??
    By gb10 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-29-2014, 05:43 PM
  4. [SOLVED] Form control button not retaining assigned macro name
    By sinistr0311 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-17-2013, 02:13 AM
  5. Creating a macro and form control button
    By kaye.roberts393 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-09-2013, 02:13 PM
  6. Macro-Button (form Control)
    By mjali001 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 01-16-2013, 09:52 PM
  7. problem a macro with form control button
    By initialcondition in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-17-2011, 01:09 PM

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