+ Reply to Thread
Results 1 to 12 of 12

Excel 2007 : Slider?

  1. #1
    Registered User
    Join Date
    01-06-2010
    Location
    Blackpool
    MS-Off Ver
    Excel 2007
    Posts
    17

    Slider?

    Hi

    I'm making a survey in XL and the scale is Strongly Disagree to Strongly Agree, I'd like for the recipient of the file to be able to simply move a slider to indicate their level of agreeance and this would capture a valur from 0-100 based on where the slider landed. EG if it landed in the middle, the output value would be 50.

    This output value needs to be available to then build into graphs - is this possible - ive searched everywhere but can only find sliders for graphs.

    Please help

    Thanks

    Simon

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Anyone know how to make a slider?

    Hi,

    In the VBE you could add a UserForm and include a 'Scroll Bar' control, setting the Max & Min property values to 0 & 100, and the Control Source property to the cell where you want the result to appear.

    HTH
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    01-06-2010
    Location
    Blackpool
    MS-Off Ver
    Excel 2007
    Posts
    17

    Re: Anyone know how to make a slider?

    Richard

    Appreciate your prompt reply, however I'm a real newbie to VBE and I wouldn't know where to start with that. Is there any chance you could be a little more specific or throw me to an example I could copy as my skills at this are way beneath yours. Thankyou

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Anyone know how to make a slider?

    Hi,

    I'm attaching a sample workbook which hopefully you can use as an example.

    Regards
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    01-06-2010
    Location
    Blackpool
    MS-Off Ver
    Excel 2007
    Posts
    17

    Re: Slider?

    Richard, This is great and I definitely can use this. Is there any way of having lots of these all static on a page all at the same time - eg. 10 questions, 10 different sliders (userforms) without having to click the link to open the slider, so you open the sheet and there are already 10 sliders sat there waiting for you to update them? Also is there anyway to make it left to right instead of up and down.

    Either way, you've really helped, if you can answer my other bits great, but if not, I'll see what I can do with the brilliant example you have sent me

    Thanks

    Simon

  6. #6
    Registered User
    Join Date
    01-06-2010
    Location
    Blackpool
    MS-Off Ver
    Excel 2007
    Posts
    17

    Re: Slider?

    Richard - Ive sussed out how to make it go left to right but cant understand how to duplicate it for seperate questions all within one sheet

    Regards, Simon

  7. #7
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Slider?

    Hi Simon,

    See the revised example on Sheet2. I've avoided the user form approach and put the slider control as an embedded object on the sheet. Right click the control to see the properties after selecting Design Mode. Copy and paste it as necessary for other questions.

    Regards
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    01-06-2010
    Location
    Blackpool
    MS-Off Ver
    Excel 2007
    Posts
    17

    Re: Slider?

    Richard - You're a genius!!. I've not exactly followed your example but ive inserted an activex scrollbar, set min and max values and linked to a cell, really simple. Ive attached my s/sheet. Is there anything wrong with using activex? other than some folks not trusting its content?

    Thanks again - Brilliant

  9. #9
    Registered User
    Join Date
    01-06-2010
    Location
    Blackpool
    MS-Off Ver
    Excel 2007
    Posts
    17

    Re: Slider?

    forgot to attach my example
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    01-06-2010
    Location
    Blackpool
    MS-Off Ver
    Excel 2007
    Posts
    17

    Re: Slider?

    Last question is - how do you post this as [SOLVED]. Well done and Thanyou

  11. #11
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Slider?

    Hi,

    In the blue bar at the top of the forum is a 'How To...? section. Just click this and read how to mark posts as solved.

    Regards

  12. #12
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Slider?

    Hi,

    I'm not aware of any real practical downsides to Activex controls. I personally think they are more flexible than the earlier Forms controls, (not to be confused with the VBA User Forms on which you can overlay an Activex Control). Jon Peltier has an article about them here http://peltiertech.com/WordPress/for...rols-in-excel/ which you may find useful.

    Regards

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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