+ Reply to Thread
Results 1 to 7 of 7

Copy Spinners with Macro

  1. #1
    Registered User
    Join Date
    10-13-2017
    Location
    Boston, MA
    MS-Off Ver
    Office 2013
    Posts
    4

    Copy Spinners with Macro

    Hi,

    I have a macro that "refreshes" a sheet by copy-pasting the functions in a given cell downwards (all of the cells that are copied to be pasted are in row 4). The macro works, except not for spinners. I have five spinners (in cells O4, R4, U4, X4, and AA4) that need to be copied downwards x number of times (depending on the number of user-entered values in column B), all with links to cells AE4, AF4, AG4, AH4, and AI4, respectively. The spinners that would be pasted downwards would need to reference cells in the same row (i.e. the spinner that was pasted in O5 should reference AE5, the spinner pasted in O6 should reference AE6, etc.). I've attached the macro for reference.

    I'm new to VBA so am figuring things out as I go, but am stumped on this one. Any ideas? Thanks!

    Please Login or Register  to view this content.

  2. #2
    Registered User
    Join Date
    10-13-2017
    Location
    Boston, MA
    MS-Off Ver
    Office 2013
    Posts
    4

    Re: Copy Spinners with Macro

    Any help on this would still be much appreciated...

  3. #3
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Copy Spinners with Macro

    Hi,

    I think a sample workbook would clarify a few things such as the type of the controls (form vs ActiveX) and their exact locations.
    Don
    Please remember to mark your thread 'Solved' when appropriate.

  4. #4
    Registered User
    Join Date
    10-13-2017
    Location
    Boston, MA
    MS-Off Ver
    Office 2013
    Posts
    4

    Re: Copy Spinners with Macro

    Thanks for the reply! I've attached a sample book below. Unfortunately, most of the formulas rely on a certain plug-in, which is why I hadn't previously attached the book. That being said, the spinners in question aren't directly related to them, so getting them to copy-paste shouldn't be related to the plug-in's formulas.

    The spinners were inserted as form controls, and their properties were set to have a maximum value of 10, moving in increments of 1. The results of clicking them will only be seen on the sheet when the value in column A is set to "Manual" for a given row.

    Thanks!
    Attached Files Attached Files

  5. #5
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Copy Spinners with Macro

    Perhaps this- I added some code to delete spinners on row 5 and on before doing the copy and paste.


    It seems the firewall on the forum will not allow me to post the code inline so I have added it to the workbook.
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    10-13-2017
    Location
    Boston, MA
    MS-Off Ver
    Office 2013
    Posts
    4

    Re: Copy Spinners with Macro

    This worked perfectly, thanks a bunch! I appreciate the help.

  7. #7
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Copy Spinners with Macro

    You're welcome, and thanks for the rep.

+ 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. Spinners of Excel 2010
    By abbassi in forum Excel General
    Replies: 3
    Last Post: 10-05-2014, 02:04 AM
  2. [SOLVED] Excel 2010: Multiple spinners using same macro
    By Taemex in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-28-2014, 04:25 AM
  3. How to do half numbers in spinners
    By Ronaldo27 in forum Excel General
    Replies: 1
    Last Post: 11-27-2008, 06:55 AM
  4. Dynamic Charts & Spinners
    By Jimi in forum Excel General
    Replies: 2
    Last Post: 12-04-2007, 10:10 PM
  5. spinners
    By xlizix in forum Excel General
    Replies: 12
    Last Post: 11-20-2007, 03:13 PM
  6. SUM IF and Spinners?
    By pavemar in forum Excel General
    Replies: 5
    Last Post: 09-19-2007, 09:37 AM
  7. Inseting spinners,
    By minimanse in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-29-2007, 05:17 AM

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