Results 1 to 3 of 3

Thread: how to simulate excel auto fillling ability in vb6?

  1. #1
    Junior Member
    Join Date
    Feb 09
    Posts
    21

    Question how to simulate excel auto fillling ability in vb6?

    Hello,
    Look at this image please:
    Name:  i436493_e.jpg
Views: 38
Size:  60.6 KB

    we can fill many cells by dragging at least two cells to down!
    how we can simulate this ability in vb6 by Listview control or something else?
    and also I didn't see this ability in Excel sheet object 2003 OLE OBJECT too !
    any solution?

  2. #2
    Addicted Member
    Join Date
    Apr 07
    Posts
    196

    Re: how to simulate excel auto fillling ability in vb6?

    Record what you are doing with a macro. I done the same thing and got this:

    Sub Filldown()
    '
    ' Filldown Macro
    '

    '
    Range("E2").Select
    ActiveCell.FormulaR1C1 = "1"
    Range("E3").Select
    ActiveCell.FormulaR1C1 = "2"
    Selection.AutoFill Destination:=Range("E3:E11"), Type:=xlFillSeries
    Range("E3:E11").Select
    End Sub

    In 2007/2010 excel click developer tab, then record macro (name it) and then do the fill down , then stop recording. Go into visual basic editor in developer tab and look for your worksheet name, open it and find module1 and code is in there.

    If you cannot see developer tab it is in file > customise ribbon and tick box

    G

  3. #3
    Junior Member
    Join Date
    Feb 09
    Posts
    21

    Re: how to simulate excel auto fillling ability in vb6?

    Thanks for your guide/sample code in excel macro.
    Of course I knew this solution.
    I have looking for a method to do the same in vb6 itself.
    I know that it may be a little hard to simulate this ability....

    Very thanks
    Last edited by pernia; Aug 22nd, 2012 at 01:11 AM.

Posting Permissions

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