Consulting

Results 1 to 11 of 11

Thread: Solved: Scroll Bar

  1. #1
    VBAX Regular Mandy's Avatar
    Joined
    Jun 2007
    Posts
    30
    Location

    Solved: Scroll Bar

    Hi

    can any one tell me how to add Scroll-Bar into Excel Sheet(ActiveX Control).

    Thanks.

  2. #2
    Moderator VBAX Wizard lucas's Avatar
    Joined
    Jun 2004
    Location
    Tulsa, Oklahoma
    Posts
    7,323
    Location
    If you're adding an activeX spreadsheet to a userform you just need to check it's properties....in the vbe select the spreadsheet and go to view-properties.

    look for displayverticalscrollbar and displayhorizontalscrollbar set them to true...which is the default.
    Steve
    "Nearly all men can stand adversity, but if you want to test a man's character, give him power."
    -Abraham Lincoln

  3. #3
    VBAX Regular Mandy's Avatar
    Joined
    Jun 2007
    Posts
    30
    Location
    Hello sir

    Actually i wanted to add Scroll Bar in the middle of the the Excel Sheet.
    Can u tell me how can i add Scroll bar in the middle of the Excel sheet, so that i can program it according to my requirement.

    Thanks

  4. #4
    Moderator VBAX Wizard lucas's Avatar
    Joined
    Jun 2004
    Location
    Tulsa, Oklahoma
    Posts
    7,323
    Location
    You can add a spreadsheet using the control toolbox...it has scrollbars..is the attached what your looking for?
    Steve
    "Nearly all men can stand adversity, but if you want to test a man's character, give him power."
    -Abraham Lincoln

  5. #5
    VBAX Regular Mandy's Avatar
    Joined
    Jun 2007
    Posts
    30
    Location
    Thanks sir
    but u are not getting my point.
    as we add scroll bar in vb6(into a form ) in the same way i want to add a scroll bar in excell sheet.
    why i want to do this?
    suppose there is a scrollbar having maximum value 1000 and min 0.
    i want to change the value of a particular cell, when i move the scroll bar.
    the value may be price that may increase or decrease.

    so i want to set the value of the a cell through scrollbar.
    i hope this will clear the sistuation.


    Thanks

  6. #6
    Moderator VBAX Wizard lucas's Avatar
    Joined
    Jun 2004
    Location
    Tulsa, Oklahoma
    Posts
    7,323
    Location
    You may be looking for a spin button...either way they are both available to the spreadsheet from the control toolbox toolbar.
    Steve
    "Nearly all men can stand adversity, but if you want to test a man's character, give him power."
    -Abraham Lincoln

  7. #7
    VBAX Regular Mandy's Avatar
    Joined
    Jun 2007
    Posts
    30
    Location
    if u are taking about option button then i have to add 1000 option button.
    ??

  8. #8
    Moderator VBAX Wizard lucas's Avatar
    Joined
    Jun 2004
    Location
    Tulsa, Oklahoma
    Posts
    7,323
    Location
    did you look at the controls available from the control toolbox?
    Steve
    "Nearly all men can stand adversity, but if you want to test a man's character, give him power."
    -Abraham Lincoln

  9. #9
    VBAX Regular Mandy's Avatar
    Joined
    Jun 2007
    Posts
    30
    Location
    sory my mistake

    let me try spin button
    Thanks

  10. #10
    VBAX Regular Mandy's Avatar
    Joined
    Jun 2007
    Posts
    30
    Location
    Thanks sir
    its working with one line code and setting minimum and maximum value of spinbutton.

    [vba]
    Price.text=spinbutton1.value
    [/vba]

    Thanks

  11. #11
    Moderator VBAX Wizard lucas's Avatar
    Joined
    Jun 2004
    Location
    Tulsa, Oklahoma
    Posts
    7,323
    Location
    Your welcome...be sure to mark your thread solved using the thread tools at the top of the page...
    Steve
    "Nearly all men can stand adversity, but if you want to test a man's character, give him power."
    -Abraham Lincoln

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •